Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-12560: TNS:protocol adaptor error

enter image description here

I Google[d] for this error ORA-12560: TNS:protocol adaptor error but not able to find the actual reason and how to solve this error ?

Can anyone tell me a perfect solution to solve login problem.

like image 309
Vishwanath Dalvi Avatar asked Aug 01 '11 05:08

Vishwanath Dalvi


People also ask

What is TNS protocol adapter error in SQL Plus?

The " ORA-12560: TNS:protocol adapter error" almost always means 1) you are on a Windows, and 2) the environment variable ORACLE_SID is not set to the name of a database whose windows service is started. That would also explain the ORA-12154. Check that the service is started, in 'services.


2 Answers

  1. Go to the windows machine that hosts the Oracle database server
  2. Go to Start -> Run -> Services.msc in Windows. Locate OracleService < SID > (here OracleServiceORCL) and click on Start to start the oracle database service (if not already running) Services

  3. Once it is up and running, from the command prompt run the following:

    tnsping < tnsalias >  

    (tnsalias entry you can find it in tnsnames.ora file)

like image 145
Bharathi Avatar answered Sep 21 '22 18:09

Bharathi


In my case I didn't have an OracleService (OracleServiceORCL) in Windows Services.msc as described in Bharathi's answer.

I executed this command:

C:\> ORADIM -NEW -SID ORCL 

and then the OracleService called OracleServiceORCL just showed up and got started in Services.msc. Really nice.


Source: https://forums.oracle.com/forums/message.jspa?messageID=4044655#4044655

like image 39
Leniel Maccaferri Avatar answered Sep 20 '22 18:09

Leniel Maccaferri