Receive "ORA-12505 - TNS: listener does not currently know of SID given in connect descriptor." error in my logs.

Solution Verified - Updated -

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.x
    • 5.x
    • 6.x

Issue

  • I'm receiving "ORA-12505: TNS:listener does not currently know of SID given in  connect descriptor" errors in my logs.  What could be causing this?
  • While starting server throws following error message

    ... 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

These errors are coming from your Oracle database that JON or Red Hat JBoss EAP are installed on:

ORA-12505: TNS:listener does not currently know of SID given in connect descriptor 

This error is caused by the listener receiving a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a 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.

To correct the issue you should do the following:

  1. Wait a moment and try to connect a second time.
  2. Check which instances are currently known by the listener by executing: lsnrctl services <listener name>
  3. Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
  4. Check for an event in the listener.log file.

Diagnostic Steps

  • For the JBoss Operations Network the message can be found in the rhq-server-log4j.log file
  • For the Red Hat JBoss Enterprise Application Platform the message can be found in the server.log file

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.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.