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 <SPAN class="operator token">=</SPAN> <SPAN class="string token">"SERVER=serverReplaceStr;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"INSTANCE=sde:postgresql:serverReplaceStr;DBCLIENT=postgresql;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"DB_CONNECTION_PROPERTIES=serverReplaceStr;DATABASE=dbReplaceStr;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"USER=userReplaceStr;PASSWORD="</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"passwordReplaceStr;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS"</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
In my case I use Oracle, so is it ok to change the connection to like this:
_oracle_db_conn_template_str <SPAN class="operator token">=</SPAN> <SPAN class="string token">"SERVER=serverReplaceStr;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"INSTANCE=sde:oracle:serverReplaceStr;DBCLIENT=oracle;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"DB_CONNECTION_PROPERTIES=serverReplaceStr;DATABASE=dbReplaceStr;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"USER=userReplaceStr;PASSWORD="</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"passwordReplaceStr;VERSION=sde.DEFAULT;AUTHENTICATION_MODE=DBMS"</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
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):
<SPAN class="string token">"PASSWORD=****;SERVER=sde:oracle11g:TEST_DB;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"INSTANCE=sde:oracle$sde:oracle11g:TEST_DB$SDE;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"DBCLIENT=oracle;DB_CONNECTION_PROPERTIES=TEST_DB;"</SPAN> <SPAN class="operator token">+</SPAN> \
<SPAN class="string token">"PROJECT_INSTANCE=sde;USER=TEST;VERSION=SDE.DEFAULT;AUTHENTICATION_MODE=DBMS"</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Why Is $SDE added to the INSTANCE name? The prefix sde:oracle11g seems not needed anymore.
Thanks
Manfred