Skip To Content

Disable Archiving

Summary

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

Usage

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

Syntax

DisableArchiving_management (in_dataset, {preserve_history})
ParameterExplanationData Type
in_dataset

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

Table; Feature Class; 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

# Import system modules
import arcpy

# Set local variables
in_dataset = "C:/Data/connections/intense.sde/intense.carbine.bike_routes"

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

Environments

Licensing information

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

Related topics