ORA-12560: TNS: 协议适配器错误

C:\Users\Administrator>set oracle_sid=lmishlj
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on 星期四 817 11:12:58 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
ERROR:
ORA-12560: TNS: 协议适配器错误
请输入用户名:

现像:数据库正常,实例正常,listener正常,数据库参数也是正常。就是不能sqlplus / as sysdba登录数据库

解决办法:
参考:http://blog.csdn.net/tan_yixiu/article/details/6762357

将环境变量中的Patch 发现 开发人员配置环境变量与以上很类似

D:\app\ODAC32\product\11.2.0\dbhome_1;D:\app\ODAC32\product\11.2.0\dbhome_1\bin;D:\app\ODAC64;D:\app\ODAC64\bin;D:\app\app\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;D:\app\app\product\11.2.0\dbhome_1\OPatch

改为

D:\app\app\product\11.2.0\dbhome_1\bin;D:\app\app\product\11.2.0\dbhome_1\OPatch;D:\app\ODAC32\product\11.2.0\dbhome_1;D:\app\ODAC32\product\11.2.0\dbhome_1\bin;D:\app\ODAC64;D:\app\ODAC64\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
C:\Users\Administrator>set oracle_sid=lmiscqtest

发现登录正常!!!!

C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on 星期四 817 11:53:23 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@lmiscqtest> Exit

你可能感兴趣的:(ORA-12560: TNS: 协议适配器错误)