Skip To Content

Enable Archiving


Enables archiving on a table, feature layer, or feature dataset.


  • Enabling archiving provides the functionality to record and access changes made to a dataset over time.

  • Archiving is only supported on enterprise geodatabases. File geodatabases do not support archiving.

  • Archiving may be enabled on versioned or nonversioned data.


EnableArchiving_management (in_dataset)
ParameterExplanationData Type

The name of the dataset on which to enable archiving.

Table; Feature Class; Feature Dataset

Code sample

EnableArchiving example 1 (Python window)

The following code snippet illustrates how to use the EnableArchiving tool in the Python window.

arcpy.EnableArchiving_management("Database Connections//toolbox.county.parcels")
EnableArchiving example 2 (stand-alone script)

The following script illustrates how to use the EnableArchiving tool in a stand-alone script.

# Name:
# Description: Enable archiving on a dataset

# Import system modules
import arcpy

# Set local variables
in_dataset = 'C:/Data/connections/Redlands.sde/TEST.TOOLBOX.rdlsstreets'

# Describe the properties of the dataset to see if archiving is enabled.
desc = arcpy.Describe(in_dataset)
isArch = desc.IsArchived

# Enable Archiving if it is not already enabled.
if isArch == False:
    # Execute EnableArchiving
    print("{0} has been enabled for archiving.".format(in_dataset))
elif isArch == True:
    # If IsArch = True, then archiving is already enabled
    print("{0} already has archiving enabled.".format(in_dataset))


Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics