Link to home
Create AccountLog in
Avatar of el123
el123Flag for United States of America

asked on

tnsping is working ... but can not connect to db

Hi guys,

I'm able to ping my server and tnsping my db, but when trying to connect either using sqlplus or toad, giving this error:

ORA-12514: TNS: listener does not currently know of service requested in connect descriptor.

Where as in toad, using TNSNames editor, able to test too and it can ping and also using network utilities it can ping & tnsping too ... but can't connect using sqlplus or even toad too.

Please assist, thanks.
Avatar of anumoses
anumoses
Flag of United States of America image

The ORA-12514 error is telling you that there is a mismatch between your TNS alias's SERVICE_NAME and the database server's SERVICE_NAME as defined for your Oracle Listener.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

tnsping does not actually connect to database.  The listener on the machine does not know about the instance you are trying to connect to.

Check the listener.ora file on the database server to make sure it is listening for your instance: lsnrctl status
Avatar of el123

ASKER

no access to the db server
Are you running multiple oracle_homes on the server conflicting each others.
Then you have a problem.  That error is from the listener telling you something is not configured properly.

You will need to contact the DBA's on the server to provide you with the correct entries for your tnsnames.ora file.
Try Creating  a new environment variable called TNS_ADMIN:
in the ‘value’ field, add the new folder: c:\oracle\network\admin

Copy tnsnames.ora, sqlnet.ora and listener.ora from c:\oracle\product\102\network\admin
Paste into c:\oracle\network\admin

-- from command line
Stop/start listener
This can be done like this
C:\>lsnrctl stop
C:\>lsnrctl start
Avatar of el123

ASKER

but guys rememebr I'm able to tnsping ... so tnsping is working but sqlplus or toad, where as with in toad, its tools, network utilities or tnsnames editor are all working fine ... but can not connect and omarfarid ... user/pwd is secondary, first it'll try to connect then authtication will come into picture ... I think.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of el123

ASKER

Guru ... :-)
Can you post the following
1) your tnsnames file
2) your sqlnet.ora file
3) The command you're using to connect to the database using sqlplus
4) Output of lsnrctl status.

Thanks
@tropically,

This question has been resolved and closed and has been for a long time.