Delete Version (Data Management)
Summary
Deletes the specified version from the input workspace.
Usage
-
Only the version's owner can rename, delete, or alter the version.
-
A parent version cannot be deleted until all dependent child versions are deleted.
-
Versions are not affected by changes occurring in other versions of the database.
Syntax
DeleteVersion_management (in_workspace, version_name)
Parameter | Explanation | Data Type |
in_workspace |
The ArcSDE geodatabase containing the version to be deleted. The default is to use the workspace defined in the Current Workspace environment. | Workspace |
version_name |
The name of the version to be deleted. | String |
Code Sample
DeleteVersion example (stand-alone script)
The following stand-alone script demonstrates how use the DeleteVersion tool to delete a version.
# Name: DeleteVersion_Example.py # Description: Deletes a version # Author: ESRI # Import system modules import arcpy # Set local variables inWorkspace = "Database Connections/ninefour@gdb.sde" newName = "myVersion2" # Execute DeleteVersion arcpy.DeleteVersion_management(inWorkspace, newName)
Environments
Related Topics
Licensing Information
ArcView: No
ArcEditor: Yes
ArcInfo: Yes
10/27/2014