Connection String for Enterprise Geodatabase with REST API

484
0
06-12-2020 01:46 AM
ManfredPaul
New Contributor

Hi, 

I am using Ansible to deploy and configure my ArcGIS Server instances. To configure the installation I use the REST API. Once the server is configured I want to deploy my map services. Since the data is in an Oracle EGDB I need to register this one (Data Stores). What I am missing at the moment is a description of the Enterprise GDB connection strings. 

I based my code on this project : GitHub - Esri/ops-server-config: Operations Server Configuration scripts 

_postgres_db_conn_template_str = "SERVER=serverReplaceStr;" + \
  "INSTANCE=sde:postgresql:serverReplaceStr;DBCLIENT=postgresql;" + \
  "DB_CONNECTION_PROPERTIES=serverReplaceStr;DATABASE=dbReplaceStr;"  + \
  "USER=userReplaceStr;PASSWORD=" + \  
  "passwordReplaceStr;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS"

In my case I use Oracle, so is it ok to change the connection to like this:

_oracle_db_conn_template_str = "SERVER=serverReplaceStr;" + \
  "INSTANCE=sde:oracle:serverReplaceStr;DBCLIENT=oracle;" + \
  "DB_CONNECTION_PROPERTIES=serverReplaceStr;DATABASE=dbReplaceStr;"  + \
  "USER=userReplaceStr;PASSWORD=" + \  
  "passwordReplaceStr;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS"

 

where: serverReplaceStr is the connection name is the tnsnames.ora file.

I took an old code (seems to use the < 10.1 syntax) from a colleague the does the same thing with arcpy. I created a SDE connection file and uploaded it manually:

The connection string looked like this (this was an Oracle 11g instance) (ArcGIS Server Manager):

"PASSWORD=****;SERVER=sde:oracle11g:TEST_DB;" + \
"INSTANCE=sde:oracle$sde:oracle11g:TEST_DB$SDE;" + \
"DBCLIENT=oracle;DB_CONNECTION_PROPERTIES=TEST_DB;" + \
"PROJECT_INSTANCE=sde;USER=TEST;VERSION=SDE.DEFAULT;AUTHENTICATION_MODE=DBMS"

Why Is $SDE added to the INSTANCE name? The prefix sde:oracle11g seems not needed anymore. 

Thanks

Manfred 

0 Kudos
0 Replies