Create Version (Data Management)


Creates a new version in the specified geodatabase.


  • The output version name is prefixed by the geodatabase user name—for example, SDE.arctoolbox.

  • The output version's permissions are set to private by default but can be changed using the Alter Version tool.

  • File geodatabases do not support versioning. Versioning tools only work with enterprise geodatabases.

  • Versions are not affected by changes occurring in other versions of the database.

  • A version's permission can only be changed by its owner (the user who created it).

  • This tool supports branch versioning through the version service.


CreateVersion(in_workspace, parent_version, version_name, {access_permission})
ParameterExplanationData Type

The enterprise geodatabase that contains the parent version and will contain the new version.

For branch versioning, use a feature service URL (that is, https://mysite.mydomain/server/rest/services/ElectricNetwork/FeatureServer).


The geodatabase, or version of a geodatabase, on which the new version will be based.


The name of the version to be created.


The permission access level for the version to protect it from being edited or viewed by users other than the owner.

  • PRIVATEOnly the owner or the geodatabase administrator can view and modify the version or versioned data.
  • PUBLICAny user can view the version. Any user who has been granted read/write (update, insert, and delete) permissions on datasets can modify datasets in the version.
  • PROTECTEDAny user can view the version, but only the owner or the geodatabase administrator can edit the version or datasets in the version.

Derived Output

NameExplanationData Type

The updated input workspace.


Code sample

CreateVersion example (stand-alone script)

The following stand-alone script demonstrates how to create a new version.

# Description: Creates a new version

# Import system modules
import arcpy

# Set local variables
inWorkspace = "c:/Connections/whistler@gdb.sde"
parentVersion = "dbo.DEFAULT"
versionName = "myVersion"

# Execute CreateVersion
arcpy.CreateVersion_management(inWorkspace, parentVersion, versionName, "PUBLIC")


Licensing information

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

Related topics