Register As Versioned (Data Management)

Summary

Registers an enterprise geodatabase dataset as versioned.

Learn more about how to register data as branch versioned and traditional versioned.

Usage

  • Versioning tools only work with datasets in an enterprise geodatabase. File geodatabases don't support versioning.

  • The type of versioning used is determined by the database connection for the input dataset; Versioning Type is a property set in the Geodatabase Connection Properties dialog of a database connection. Learn how to set the versioning type using the geodatabase connection properties.

  • Registering a feature dataset as versioned registers all feature classes in the feature dataset as versioned.

  • The input dataset must be from a database connection established as the data owner.

  • Archive-enabled datasets cannot be registered as versioned. If you've already enabled archiving on your data but you also want to register your data as versioned, you must first disable archiving, register the data as versioned, and re-enable archiving.

  • Note:

    Once a dataset has been registered as branch versioned, the minimum client version for the dataset is ArcGIS Pro 2.1. This means that the dataset will no longer be available for use in ArcGIS Desktop.

Syntax

RegisterAsVersioned(in_dataset, {edit_to_base})
ParameterExplanationData Type
in_dataset

The dataset to be registered as versioned.

Table View; Feature Dataset
edit_to_base
(Optional)

Specifies whether edits made to the default version will be moved to the base tables. This parameter is not applicable for branch versioning.

  • NO_EDITS_TO_BASEThe dataset will not be versioned with the option of moving edits to base. This is the default.
  • EDITS_TO_BASEThe dataset will be versioned with the option of moving edits to base.
Boolean

Derived Output

NameExplanationData Type
out_dataset

The updated input dataset.

Table View; Feature Dataset

Code sample

RegisterAsVersioned example (stand-alone script)

The following stand-alone script demonstrates how to use the RegisterAsVersioned tool to register a dataset as versioned.

# Name: RegisterAsVersioned_Example.py
# Description: Registers dataset as versioned

# Import system modules
import arcpy

# Set local variables
datasetName = "c:/Connections/ninefour@gdb.sde/ninefour.GDB.ctgFuseFeature"

# Execute RegisterAsVersioned
arcpy.RegisterAsVersioned_management(datasetName, "NO_EDITS_TO_BASE")

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics