altering a geodatabase connection using python

3016
1
07-13-2015 03:34 PM
ShaneTurk1
New Contributor

I am in the process of deploying an Esri Enterprise geodatabase from scratch on SQL Server 2012.

This involves the use of SQLCMD and Powershell to create the database, schemas, users and security.  I have then scripted up a python script to create the database connections for the SDE Admin user (to enable geodatabase) to the 8 databases.  NOTE:  There is no geodatabase enabled in each database yet so any of the Geodatabase properties are ignored (as the documentation states).  A second script then enables geodatabase (using the keycodes file) for each of the 8 databases using the SDE Admin database connection created in the previous script.  Both scripts work fine.  However, when I open ArcCatalog and double click on any geodatabase there is an error stating the the default version is not found.  I right mouse click on the connection and select the Geodatabase properties and select 'Geodatabase Connection Properties', The Transactional Version with the owner sde and press OK.  The connection is then successful.

Question 1):  Even though I set all of the parameters when I create the initial connection, why are they (version_type and version) not accepted once geodatabase has been enabled? 

Comment 1): If I create a connection with exactly the same details (just a different connection name) it connects as expected.

Question 2):  Is there a method I can use to check for an existing Enterprise database connection without looking for an SDE file in the C:\Users\XXX\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog directory?

Question 3):  Is there a method to update a database connection?

The objective of this is to try and remove the amount of manual steps (ArcCatalog use) in an Enterprise database deployment.

Thanks in advance...

0 Kudos
1 Reply
RJSunderman
Esri Regular Contributor

Shane -

I've moved your question to GeoNet's space for GIS > Enterprise GIS > ArcGIS for Server discussions. I think your question on scripting geodatabase administration is better positioned here than in the GeoEvent area.

Best Regards -

RJ

0 Kudos