Underlying DBMS error when connecting to Geodatabase

6462
3
06-21-2017 03:57 AM
Highlighted
New Contributor

When executing sdetable command from command prompt I am getting an Underlying DBMS error(-51).

I have Oracle 11g database with ArcSDE 10.1 installed.

Following is the sdetable command,

sdetable -o describe -t sites -i sde:oracle11g:mydb -s 10.169.43.22 -u sde -p sde

Following is the result:

Error: Underlying DBMS error (-51).

Error: Could not create a connection on server 10.169.43.22, for user sde

Extended DBMS error code: -1
Unknown error
No extended error.

Following is the log in sdedc_Oracle.txt:

DB_open_instance()::db_connect (OCI8) error: -1
CAN'T OPEN INSTANCE: sde:oracle11g.
Spatial Engine Connection Failed (-51).
Cannot Get Access to Instance sde:oracle11g

Any insight on these type of errors and the probable reasons that could have led this error is appreciated.

Reply
0 Kudos
3 Replies
Highlighted
Occasional Contributor II

Hi Abdul, 

 From my experience, there are quite a few potential culprits to the connection issue / error you are experiencing. Do you have 10.1 (or newer) ArcGIS Desktop to test out a direct connection to that database? Can you connect through SQLplus using sde / sde as credentials as noted in the above example? I'd say we first need to verify that connection to that Oracle database is possible and then we can begin to isolate where the point of failure is. Possible points of failure include but aren't limited to:

  • Network issues / lack of connectivity to the database server
  • Credentials (sde/sde)
  • ArcSDE application server / service (if applicable) -is the service running, etc.
  • Oracle client files (instant / admin client) 32 bit and 64 bit? What version oracle client is present? For example, I believe Oracle 12c clients aren't compatible with Command Line tools. In this circumstance, I'd recommend reinstalling the Oracle 11g client and trying again. 
  • tnsnames.ora located on this client machine, and referencing the proper Oracle SID info?
  • Listener up and running on the server machine? Accepting connections? 

 These are just a few areas that come to mind. If you could verify the ability to connect outside of command line to this database that would be helpful in narrowing down the cause. I hope this helps!

Best,

Rex R

Highlighted
New Contributor

Hi Rex,

Thank you for taking time and being helpful.

I am executing sde table commands from within the database server and I don't have ArcGIS Desktop 10.1 installed in this database server but I have ArcGIS Desktop 10.1 installed in different server from where I can connect to the database using the direct connection in ArcGIS Desktop without any issues. I also tried from within the database server to connect to the database using SQLPlus with sde/sde as credentials and I am able to connect the the database without any issues. 

  • No network issues as I am connecting to the database from within the database server
  • I am able to connect to the database using credentials(sde/sde)
  • I have only ArcSDE 10.1 installed in this server
  • I have installed Oracle Client 11.2.0 (RUNTIME) both 32 bit and 64 bit.
  • I have properly configured Oracle SID to my database
  • Listener is up and running as I am able to connect to the db

Besides I would also like to tell you that I have manually pointed my Oracle_Home environment variable to 64bit client as this configuration is working in another server where I am able to execute sdetable commands. But I have some scheduler jobs running in my database server which uses the sdetable commands and when the job is running it is throwing underlying dbms error. This scheduler job is written on ArcGIS api for C++. Anything am I missing here to configure that is responsible for this error?.

Reply
0 Kudos
Highlighted
New Contributor

After doing some more R&D I finally get to a conclusion that my Geodatabase is not accepting direct connection i.e., sde:oracle11g:mydb from within database server but the same Geodatabase is accepting the direct connection from other server.

What could be the reason here, Why my Geodatabase is not accepting direct connections from local server and accepting from remote servers?. Please let me know if I am missing some configuration that is denying connection to the database from local using direct connection string and throwing underlying dbms error.

Reply
0 Kudos