How To Change the SDE Transaction Version in Python

2521
2
01-22-2016 11:43 AM
JoseSanchez
Occasional Contributor III

Hello everyone,

How can I change in Python the current Geodatabase Connection Properties from a SDE connection to point to a specific version instead of DEFAULT one.

What I need to do in Python is the same thing we do in ArcMap  "Change SDE Version".

Ideally I would like to create 2 connections in my script to the same SDE instance  one pointing to DEFAULT and another to PREPRODUCTION.

Thanks

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Jose,

You can use the Change Version function to do this.

JoseSanchez
Occasional Contributor III

Hi Jake,

I tried to use the feature " Change Version" with a feature class and I had a issue with that because the feature class has a GLOBALID field so when I try to save it to a file geodatabase the column GLOBALID does not get created.

The easiest solution for me is to create in ArcCatalog 2 connections to the same SDE instance one pointing to Transactional Version DEFAULT and another pointing to Transactional Version PREPRODUCTION.

I am wondering  if there is a way to specify the Transactional Version, or change the Transactional Version in a connection in Python.

Thanks

0 Kudos