Home sql ORA-12505: TNS: listener does not currently know of SID given in connect...

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

Author

Date

Category

I’m trying to create a connection in SQL Developer. There is such an error ORA-12505: TNS: listener does not currently know of SID given in connect descriptor
listener.ora

SID_LIST_LISTENER =
 (SID_LIST =
  (SID_DESC =
   (SID_NAME = CLRExtProc)
   (ORACLE_HOME = C: \ app \ product \ 11.2.0 \ dbhome_1)
   (PROGRAM = extproc)
   (ENVS = "EXTPROC_DLLS = ONLY: C: \ app \ product \ 11.2.0 \ dbhome_1 \ bin \ oraclr11.dll")
  )
 )
LISTENER =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
   (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
  )
 )

ADR_BASE_LISTENER = C: \ app

tnsnames.ora

ORACLR_CONNECTION_DATA =
 (DESCRIPTION =
  (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
  )
  (CONNECT_DATA =
   (SID = CLRExtProc)
   (PRESENTATION = RO)
  )
 )
SYSDBA =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = sysdba)
  )
 )
LISTENER_SYSDBA =
 (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))

Answer 1, Authority 100%

It is necessary to read the more detailed description of the causes and effects in the case of this error:

$ oerr ora 12505
12505, 00000, "TNS: listener does not currently know of SID given in connect descriptor"
// * Cause: The listener received 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.
// * Action:
// - Wait a moment and try to connect a second time.
// - Check which instances are currently known by the listener by executing:
// lsnrctl services & lt; listener name & gt;
// - Check that the SID parameter in the connect descriptor specifies
// an instance known by the listener.
// - Check for an event in the listener.log file.

Listener has received the connection request, but specified connection identifier is unknown to him. For example, if it receives the next parameter, the identifier XXX the first time he hears:

[...]
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XXX))

As the connection identifier can be specified:

  • SERVICE_NAME – sotoyaschy of DB_NAME – name of the database that was specified during installation, and DOMAIN_NAME – the domain database server by default, for example, _mydomain.ru.

  • SID – the system identifier of the database instance, for developers it is not relevant and should not be used must be specified in the listener.ora configuration used for remote administration database instance

To find out what the listener already knows, can command lsnrctl status (with the option services , for more details). If the output of no rows with the desired service name, then it is incorrect:

Service "XXX" has 1 instance (s).
 Instance "ORACL", status READY, has 1 handler (s) for this service ...

As a result, the next connection request from the issue would be a success:

sqlplus sys / & lt; pass & gt; @ localhost / sysdba as sysdba

PS choice of name service made the vehicle, it is not successful and can cause misunderstanding

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions