ORA-12560: TNS:protocol adapter error

Cause:

This error occur when we try to connect to database instance using sqlplus but the environment variables are not set up properly for database so that sqlplus invocation fail

C:\Windows\system32>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 6 13:24:11 2021

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

ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name: ^Z
C:\Windows\system32>

Workaround:

Set the environment variables like ORACLE_SID,ORACLE_HOME,PATH and LD_LIBRARY_PATH etc…

C:\Windows\system32>set ORACLE_SID=saeuv07

C:\Windows\system32>set ORACLE_HOME=E:\app\product\11.2.0\dbhome_2

C:\Windows\system32>
C:\Windows\system32>
C:\Windows\system32>echo %ORACLE_HOME%
E:\app\product\11.2.0\dbhome_2

C:\Windows\system32>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 6 13:25:16 2021

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


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

SQL> 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s