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.
The input dataset must be from a database connection established as the data owner.
Syntax
arcpy.management.DisableArchiving(in_dataset, {preserve_history})
Parameter | Explanation | Data Type |
in_dataset | The geodatabase feature class, table, or feature dataset for which archiving will be disabled. | Table; Feature Class; Feature Dataset |
preserve_history (Optional) | Specifies whether records that are not from the current moment will be preserved. If the table or feature class is versioned, the history table or feature will become enabled. For nonversioned data, a 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 appended _h.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_dataset | The updated input dataset. | Table; Feature Class; Feature Dataset |
Code sample
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")
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
- Basic: No
- Standard: Yes
- Advanced: Yes