why am i getting test failure message when i try to test connections

by Hess

Status : Failure -Test failed: Listener refused the connection with the following error:

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

Comments for why am i getting test failure message when i try to test connections

Average Rating starstarstarstarstar

Click here to add your own comments

Mar 03, 2015
Rating
starstarstarstarstar
Check TNSNAMES entries
by: Anonymous

This error means that the listener doesn't recohnize the sid specified in the tnsnames entry for this particular database. This is usally due to a typo in the tnsnames file so you need to check that carefully.

For example the following TNSNAMES entry defines an alias called "orcl" as connecting to a service with the same name:

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.home)
)
)

In the above example SERVICE)NAME is equivalent to SID in earlier versions of Oracle. In this case the service name is "orcl.home". By changing this to "orcll.home" (ie. note the double "l") any attempt to connect to the alias "orcl" will fail.

You can check to see which services the listener knows about by typing "lsnrctl services" on the machine hosting the database.

Dpending on which version of Oracle tou're running it could also be caused by the database not having registered yet with the listener if either the listener or the database has just started.

See the Database Net Services Guide ar http://docs.oracle.com/database/121/NETAG/concepts.htm#NETAG177 for more information.

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Oracle Questions.