Common Oracle Error ORA-12560

Owh, ORA-12560: TNS:protocol adapter error..

This is the error that always I faced and always forgot what is this error about.
This error was like dejavu all over again. I ever faced and solved this but, how eh? Every time this error comes, I’m start looking and navigate to tnsnames.ora, sqlnet.ora and other .ora files. Haha :D

The error appear whenever I want to sqlplus / as sysdba:

C:\Users\fareast>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 17 00:29:50 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-12560: TNS:protocol adapter error

Enter user-name:

Ok, now the work around.

How many database on this machine? 1 or more than 1? ok, thats the cause of ORA-12560: TNS:protocol adapter error.

Solution1 :

C:\Users\fareast>sqlplus system/password@orcl_is_my_db

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 17 00:40:50 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

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

but for Solution 1, I need to add "orcl_is_my_db" SQL*Net configuration string inside the tnsnames.ora

Solution2:

C:\Users\fareast>set ORACLE_SID=orcl

C:\Users\fareast>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jan 17 00:45:40 2010

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

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

SQL>

Just set the ORACLE_SID to environment and we’re done.

for Windows :  set ORACLE_SID=orcl

for Unix: export ORACLE_SID=orcl

Ok, thats all my notes for today..:)

Blog Widget by LinkWithin