Sqlplus doubt


Oracle 9:
When i type sqlplus in command line and enter username and password, i can able to login in.

When i type sqlplus username@instance , it ask for password , when i type password it throws error .

Error: ORA-12154 ``TNS:could not resolve service name"

Please help me understand why it occurs , i googled but dont understand what they trying to convey.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

HuaMin ChenProblem resolverCommented:
Try to see if you are able to ping the IP of Oracle database server machine.
Wasim Akram ShaikCommented:
one of the probable reasons is your ORACLE_SID is set in your machine.. so you are connecting its directly taking the SID .. when you specify it via username/password@instance..

the @instance entry should be present in your tnsnames.ora file which is generally present in your <ORACLE_HOME>/Network/Admin Folder..
check out the entry which is present there.. if not make an entry here .. this should resolve your issue..

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
Geert GOracle dbaCommented:
assuming windows here ...

you might have script on your computer like this


toad %1 %2 %3 %4 

Open in new window

what happens if you type sqlplus without any parameters ?
can you see the header of sqlplus ?

and then enter user@alias
and password

and then what happens ?
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.