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.
el123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.