• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6483
  • Last Modified:

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.
0
el123
Asked:
el123
  • 4
  • 4
  • 3
  • +2
1 Solution
 
anumosesCommented:
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.
0
 
slightwv (䄆 Netminder) Commented:
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
0
 
el123Author Commented:
no access to the db server
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
anumosesCommented:
Are you running multiple oracle_homes on the server conflicting each others.
0
 
slightwv (䄆 Netminder) Commented:
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.
0
 
anumosesCommented:
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
0
 
el123Author Commented:
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.
0
 
anumosesCommented:
0
 
slightwv (䄆 Netminder) Commented:
again: tnsping does not talk directly to the database.  Just that a listener is listening on the database server.

Check your tnsnames.ora file.  The service name you have must not match a service name being listened to on the database server.
0
 
el123Author Commented:
Guru ... :-)
0
 
tropicallyCommented:
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
0
 
slightwv (䄆 Netminder) Commented:
@tropically,

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now