Summary
Unregisters an ArcSDE dataset as versioned.
Usage
Versioning tools only work with ArcSDE data. File and personal geodatabases do not support versioning.
Unregistering a dataset as versioned without first compressing the geodatabase could lead to loss of edited data.
- To improve database performance, the database should be compressed periodically. Compressing the database removes all unreferenced database states and redundant rows. Only the SDE administrator can perform this task.
- After compressing the database or editing the data, the Analyze tool should be executed to update the database statistics for each dataset or feature class. This will improve display and query performance.
Versions are not affected by changes occurring in other versions of the database.
Syntax
UnregisterAsVersioned_management (in_dataset, {keep_edit}, {compress_default})
Parameter | Explanation | Data Type |
in_dataset | Name of the ArcSDE dataset to be unregistered as versioned. | Table View; Feature Dataset |
keep_edit (Optional) | Specifies whether edits made of the version should be maintained.
| Boolean |
compress_default (Optional) | Determines whether edits will be compressed and unused data will be removed. This option is ignored if the KEEP_EDIT keyword is used when specifying the keep_edit parameter.
| Boolean |
Code sample
UnregisterAsVersioned example (stand-alone script)
The following stand-alone script demonstrates how to use the UnregisterAsVersioned tool to unregister a dataset as versioned.
# Name: UnregisterAsVersioned_Example.py
# Description: Unregisters a dataset as versioned
# Author: ESRI
# Import system modules
import arcpy
# Set local variables
datasetName = "c:/whistler@prod.sde/prod.GDB.ctgFuseFeature"
# Execute UnregisterAsVersioned
arcpy.UnregisterAsVersioned_management(datasetName,
"NO_KEEP_EDIT",
"COMPRESS_DEFAULT")
Environments
Licensing information
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes