How to resolve ORA-12560: TNS:protocol adapter error

You are here : Home / Core Java Tutorials / JDBC - Java Database connectivity tutorial



In this tutorial we will Resolve ORA-12560: TNS:protocol adapter error.



C:\Users\ankitmittal01>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 1 23:34:28 2015

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: system
Enter password:
ERROR:
ORA-12560: TNS:protocol adapter error



This problem occurs when your database is not up. By default Oracle services start at windows startup, but they might have been stopped manually by user.

Let’s resolve this problem by starting the database server in 2 ways -

Solution 1-
In windows, Go to start, run (Windows + r), and type Services.msc

And start all the below services manually -
OracleMTSRecoveryService
OracleOraDb11g_home1ClrAgent
OracleOraDb11g_home1TNSListener
OracleServiceORCL


Now, your database is up, and will resolve your problem.



Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options




Solution 2-
We will start Oracle services through CMD.

C:\Users\ankitmittal01>Set oracle_sid=ORCL

C:\Users\ankitmittal01>net start oracleserviceORCL
The OracleServiceORCL service is starting...
The OracleServiceORCL service was started successfully.



Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Set Oracle_Sid
  • C:>set oracle_sid=ORCL
Then, type net start command.
  • C:>net start oracleserviceORCL


So in this tutorial we Resolved ORA-12560: TNS:protocol adapter error.
eEdit
Must read for you :