Select to view content in your preferred language

arcpy query version information

971
3
01-27-2012 10:00 AM
RyanKozoriz
Emerging Contributor
Is it possible, using arcpy, to query version information from SDE? I would like to report information such as Version Name, Owner, Creation Date, Modified Date, Description, and Permissions.
Thanks,
Ryan
Tags (2)
0 Kudos
3 Replies
RussellBrennan
Esri Contributor
Is it possible, using arcpy, to query version information from SDE? I would like to report information such as Version Name, Owner, Creation Date, Modified Date, Description, and Permissions.
Thanks,
Ryan


Currently this is not possible @ version 10.0 of ArcGIS. With 10.1 we will have an arcpy.da.ListVersions function that will return version objects with all of these properties.
0 Kudos
RyanKozoriz
Emerging Contributor
Thanks for a quick response. Looking forward to 10.1!
0 Kudos
JeffBarrette
Esri Regular Contributor
With arcpy.mapping you can get the following SDE properties using the serviceProperties property on the Layer object.

Keys for an ArcSDE dictionary

ServiceType �??The property displaying the type of service. This will only be SDE for ArcSDE layer types.
Server �??The name or IP address of the computer where the ArcSDE geodatabase is located.
Service �??The name or port number of the process running on the ArcSDE server.
Database �??The name of the enterprise RDBMS database. This is not required when using Oracle.
UserName �??A user account. This will be blank if using operating system authentication.
AuthenticationMode �??Geodatabase or operating system authentication.
Version �??The version of the geodatabase to which you are connecting.

There is a code sample that uses this property.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/

Jeff
0 Kudos