Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Cannot connect to Oracle Service Name only SID



Unable to connect to an external database using service name.

Error Messages

Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Steps to Reproduce

  1. Have a valid configuration to connect to a SID
  2. Replace SID name with a service name and recycle.

Root Cause

The root cause of this problem is in a third-party product.


This is an issue with the Oracle TNS listener most likely. In order to help isolate the problem, perform the following change to the operating environment: 
  1. Execute the  "lsnrctl status" command from the oracle server.
  2. Use any database client tool on the same machine that runs PRPC and connect using the URL that you have provided.
The above mentioned steps allow the configuration actions to know whether the TNS listener is configured properly.

The explanation for this behavior is as follows:

As an example configure the tnsnames.ora file to have an entry similar to the following data:

   (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
       (SERVICE_NAME =

The connection url should look like this

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us