ArcPy.AddDataStoreItem Bug

Discussion created by jvseagle-co-nz-esridist Employee on Feb 18, 2013
Latest reply on Feb 18, 2013 by jvseagle-co-nz-esridist

I have an SDE connection that points to version SDE.DEFAULT. If I register that sde connection with ArcGIS for Server using ArcPy it works.

If I create another connection file with exact same values except the version (e.g. DBO.WHATEVER) and try to register with ArcGIS for Server the AddDataStoreItem method fails saying Client database entry is already registered. This is wrong because when I analyse the connections it says that the Data Source is not registered with ArcGIS for Server which is true since the version is different ...

If I register that connection using both ArcGIS for Server or ArcGIS Desktop built-in functions using the import button it works as expected. If instead of passing as arguments the sde connection I use the string (e.g. ENCRYPTED_PASSWORD=00022e6858746e5734667063704b444a556f32623865634c4372634e2f645563514f5361423062367731617a36496b3d2a00;SERVER=MYHOST;INSTANCE=sde:sqlserver:MYHOST;DBCLIENT=sqlserver;DB_CONNECTION_PROPERTIES=MYHOST;DATABASE=sde;USER=sa;VERSION=DBO.WHATEVER;AUTHENTICATION_MODE=DBMS) it works.

I need this method to work properly as users generates versions through Workflow Manager and need that services are available on ArcGIS for Server on-the-fly. Please fix this issue.