ORA-12560: TNS:protocol adaptor error
- Go to the windows machine that hosts the Oracle database server
Go to Start -> Run -> Services.msc in Windows.
Locate OracleService < SID > (hereOracleServiceORCL
) and click onStart
to start the oracle database service (if not already running)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)
ORA-12560: TNS: Error protocol Adapter
I think I know the problem. You said that you did the same steps in the tutorial.
In the tutorial, he did this step C:>set oracle_sid=db
.
Did you have the same name of the Oracle SID
? If you did a default installation, by the default the Oracle SID
is orcl
.
In your case, do this C:>set oracle_sid=ORCL
. To verify the Oracle SID
, go to this path C:\oracle\app\oracle\product\11.2.0\server\network\ADMIN
and open the listener.ora
and check the host
name.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =ORCL)(PORT = 1521)
)
)
)
If you have HOST=ORCL
, then you must do this C:>set oracle_sid=ORCL
. If you have another name, do this C:>set oracle_sid=NAME_OF_YOUR_HOST
Related Topics
How to Query Between Two Dates Using MySQL
Recommended SQL Database Design For Tags or Tagging
MySQL: @Variable Vs. Variable. What's the Difference
How to Cast the Datetime to Time
Is There a Combination of "Like" and "In" in Sql
How to Make SQL Case Sensitive String Comparison on MySQL
Will Ansi Join Vs. Non-Ansi Join Queries Perform Differently
How to Implement One-To-One, One-To-Many and Many-To-Many Relationships While Designing Tables
Simple Way to Calculate Median With MySQL
How to Insert a Value That Contains an Apostrophe (Single Quote)
Foreign Key to Non-Primary Key
MySQL Trigger to Prevent Insert Under Certain Conditions
How to Pass a Table Name into a Stored Proc
SQL Select Where Field Contains Words
Grouped Limit in Postgresql: Show the First N Rows For Each Group