Sqlplus doubt

Hi,

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.

Thanks
LVL 5
magentoAsked:
Who is Participating?
 
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..
0
 
HuaMin ChenSystem AnalystCommented:
Try to see if you are able to ping the IP of Oracle database server machine.
0
 
Geert GOracle dbaCommented:
assuming windows here ...

you might have script on your computer like this

sqlplus.cmd

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 ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.