Skip to Main Content
  • Questions
  • ERROR: ORA-12560: TNS:protocol adapter error

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Sunil Kumar.

Asked: December 16, 2016 - 1:27 am UTC

Last updated: December 17, 2016 - 2:00 am UTC

Version: 12c

Viewed 10K+ times! This question is

You Asked

Hi,

I have my db on machine x1 with Service_name: abc


I am on a different machine where I have client installed as Administrator

and I have placed my TNS entries in :Network\Admin\tnsnames.ora

from command prompt if I say Sqlplus scott/tiger@abc

am able to connect

but If I say Sqlplus scott/tiger

am getting

ERROR: ORA-12560: TNS:protocol adapter error.

How do I get resolved this error.

Many Thanks,

and Connor said...

connect scott/tiger@abc

means connect to the database details as per tnsnames.ora entry (as you've already described).

connect scott/tiger

means connect to the database on the *local* machine, which is why you're getting the error, because presumably there is no database on your machine.

If you do:

set LOCAL=abc

then when you do

sqlplus scott/tiger

it will be the same as doing:

sqlplus scott/tiger@abc

Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Lovely that worked

Sunil Kumar Noothi, December 16, 2016 - 4:05 am UTC

As always, I will get the right answer from you Connor
Connor McDonald
December 17, 2016 - 2:00 am UTC

Glad we could help

Oracle client connect

Tariq H, February 06, 2019 - 6:22 am UTC

very well explained