Skip To Content

Unregister As Versioned


Unregisters an enterprise, workgroup, or desktop geodatabase dataset as versioned.


  • Versioning tools only work with datasets in an enterprise, workgroup, or desktop geodatabases. File 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 geodatabase 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.


UnregisterAsVersioned_management (in_dataset, {keep_edit}, {compress_default})
ParameterExplanationData Type

Name of the dataset to be unregistered as versioned.

Table View; Feature Dataset

Specifies whether edits made of the version should be maintained.

  • KEEP_EDITIf there are existing edits in the delta tables the tool will fail with an error message. Do not use this option if you intend to compress your edits from the Default version in the compress_default parameter. This is the default.
  • NO_KEEP_EDITIf there are existing edits in the delta tables the tool will allow deletion of these edits.

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.

  • COMPRESS_DEFAULTEdits in the Default version are compressed to the base table. This is the default.
  • NO_COMPRESS_DEFAULTAny edits remaining in the delta tables are not compressed.

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:
# 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


Licensing information

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

Related topics