cancel
Showing results for 
Search instead for 
Did you mean: 

Tns Entry Error

Monish
Occasional Visitor

Tns Entry Error

Hi,

I am getting any error ORA-12505. If I execute tnsping dbname it is successful. but as soon as I try to login it gives the above mentioned error.

Is there anything else that you can highlight to me for testing..

Thanks a ton

regards
monish
3 REPLIES
Jon Mattatall
Esteemed Contributor

Re: Tns Entry Error

Check the obvious first...

tnsnames.ora
listener.ora - Do the Oracle SID's match up?

Do "lsnrctl status listener_name" and "lsnrctl services listener_name" look okay? Is it running?

Are your environment variables ok? ORACLE_HOME, ORACLE_SID, NLS_LANG, etc?
A little knowledge is dangerous - none is absolutely terrifying!!!
Yogeeraj_1
Honored Contributor

Re: Tns Entry Error

hi monish,
*
below a quote from metalink (note: 111910.1 )
*
see if this helps!
*

The SID being supplied by the client in unknown to the listener you are trying
to connect to. To begin troubleshooting, start at the server and issue a lsnrctl stat [listener_name] command. This will display a list of available SIDs. Make sure the instance you want to connect to is shown. If it is not, edit the listener.ora file to include your instance, restart the listener, and retry the operation.
*
On the client, open the TNSNAMES.ORA file and verify the SID in the CONNECT_DATA section of your Net Service Name is correct and matches the SID name on the listener side.
*
If the SID is correct, make sure the HOST in the address section is pointing to the correct server or IP address. If the HOST is pointing to an old address and the listener on the old server is not listening for the sid specified then the connection will fail with an ORA-12505.
*
If the configuration files look correct then you have a pathing problem where the wrong TNSNAMES.ORA file is being picked up. To verify this invoke SqlNet client tracing to level 16*. Check your SqlNet specific documentation for details.
*
Search for the word �tnsnames.ora� in the resulting trace file. You'll see where the TNSNAMES.ORA file is being loaded from. If the path is incorrect, either edit that specific TNSNAMES.ORA file or set the TNS_ADMIN* environment variable to point to the location of your configuration files.
*
If you are using a naming adapter other than TNSNAMES, such as Oracle Names or LDAP, generate a level 16 client trace and search for the word CONNECT_DATA. The value of CONNECT_DATA is what the client is using to connect. Make changes if necessary and retry the operation.

*
hope this helps!
*
regards
Yog
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Monish
Occasional Visitor

Re: Tns Entry Error

Thank you guys...i will check as specified..