ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Enable Archiving

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Usage

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

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

  • Archiving may be enabled on versioned or nonversioned data.

    Learn more about enabling archiving

Syntax

EnableArchiving_management (in_dataset)
ParameterExplanationData Type
in_dataset

The name of the dataset on which to enable archiving.

Feature Layer; Table View; Feature Dataset

Code sample

EnableArchiving example (Python window)

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

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

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

# Name: EnableArchiving_Example.py
# 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
    arcpy.EnableArchiving_management(in_dataset)
    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))

Environments

  • Current Workspace

Licensing information

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

Related topics

  • An overview of the Archiving toolset
  • Enabling archiving
  • Disabling archiving
  • The archive process

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal