Search code examples
oracleoracle9i

How to list service names in Oracle database with no access to ssh


Using an Oracle 9i database, is there a method to list all the active service names if I don't know which databases/SIDs/service names are running?

I'm trying to connect but the main error is

Listener refused the connection with the following error: ORA-12504, TNS:listener was not given the SID in CONNECT_DATA

and if I use the database name the IT manager gave me

Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

The database is Oracle 9i running on a server in same local network. I obviously have hostname, port, username and password to connect the database (I have no access to the server's command line).

I'm trying to connect using Oracle SQL developer (and also tried in PHP 7 using latest PECL library).

Thank you!


Solution

  • It is only possible to "guess" the SID (there are many techniques as reported in https://erpscan.com/wp-content/uploads/pub/Different%20ways%20to%20guess%20Oracle%20database%20SID.pdf ) but there isn't a straightforward method to get it without accessing a tnsnames.ora or similars.