Receive "ORA-12505 - TNS: listener does not currently know of SID given in connect descriptor." error in my logs
Environment
- Red Hat JBoss Operations Network (ON)
- 2.3
- 2.4
- 3.0
- 3.1
- 3.2
- 3.3
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4
- 5
- 6
- 7
- Red Hat ActiveMQ (AMQ)
- 7.5
- Oracle Database
Issue
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
errors-
Server produces or throws following error message when starting:
WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main) Throwable while attempting to get a new connection: null org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (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) ... 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
Resolution
- Verify that the database server is fully started/functional.
- Verify the connection details (host/IP, SID, etc.) are appropriate for the database.
- Verify that the connection URL is provided in a valid format (consult Oracle documentation).
- Consult Oracle Support for additional information.
Root Cause
The connect descriptor received by the Oracle Database listener specified an Oracle System ID SID for an instance (usually a database instance) that either has not yet dynamically registered with the listener or has not been statically configured for the listener.
- This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
- The error may also indicate that an incorrect SID (or connection URL format) has been used.
Diagnostic Steps
- The message can be found in the JBoss server's log file.
- What does the output of
lsnrctl services <listener name>
reveal? This command should be executed on the Oracle Database host. Is the SID correct and properly registered with the listener? - Review the database host's
listener.log
file for relevant events surrounding database startup and the connection attempt.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments