Disable Archiving (Data Management)

License Level:BasicStandardAdvanced

Summary

Disables archiving on a geodatabase feature class, table, or feature dataset.

Usage

Syntax

DisableArchiving_management (in_dataset, {preserve_history})
ParameterExplanationData Type
in_dataset

Geodatabase feature class, table, or feature dataset for which archiving will be disabled.

Feature Layer; Table View; Feature Dataset
preserve_history
(Optional)

Determines if records that are not from the current moment will be deleted or preserved.

If the table or feature class is versioned, the history table or feature will become available.

For nonversioned data, a new table or feature class will be created that contains the history information. The name of the new dataset will be the same as the input with an _h appended.

  • PRESERVERecords that are not from the current moment will be preserved. This is the default.
  • DELETERecords that are not from the current moment will be deleted.
Boolean

Code Sample

DisableArchiving example 1 (Python window)

The following Python window script demonstrates how to use the DisableArchiving tool in immediate mode.

import arcpy
arcpy.DisableArchiving_management("Database Connections//sam.hills", "PRESERVE")
DisableArchiving example 2 (stand-alone script)

The following script demonstrates how to use the DisableArchiving tool in a stand-alone script.

# Name: DisableArchiving_Example.py
# Description: Disable archiving on a dataset
# Author: ESRI

# Import system modules
import arcpy

# Set local variables
in_dataset = "Database Connections//intense.sde//intense.carbine.bike_routes"

# Run program
desc = arcpy.Describe(in_dataset)
if desc.isArchived == False:
  arcpy.EnableArchiving_management(in_dataset)
  print 'Successfully enabled archiving on: {0}'.format(in_dataset)
else:
  print 'Archiving has already been enabled.'

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015