Summary
Unregisters an enterprise geodatabase dataset as versioned.
Usage
The input dataset must be from a database connection established as the data owner.
-
Versioning tools only work with datasets in an enterprise geodatabases. File geodatabases do not support versioning.
An exclusive lock is required on the dataset.
Unregistering a branch versioned dataset without first posting all named versions to the default version may result in a loss of edits.
Unregistering a traditional versioned dataset without first compressing the geodatabase may lead to loss of edited data.
Syntax
UnregisterAsVersioned(in_dataset, {keep_edit}, {compress_default})
Parameter | Explanation | Data Type |
in_dataset | The name of the dataset to be unregistered as versioned. | Table View; Feature Dataset |
keep_edit (Optional) | Specifies whether edits made to the versioned data will be maintained.
| Boolean |
compress_default (Optional) | Specifies whether edits will be compressed and unused data will be removed. This option is ignored if the KEEP_EDIT option is used in the keep_edit parameter. This option is only applicable for traditional versioned datasets.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_dataset | The unregistered dataset. | Table View; Feature Dataset |
Code sample
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
- Basic: No
- Standard: Yes
- Advanced: Yes