Oracle出错:ORA-12505, TNS:listener does not currently know of SID given in connect desc

Oracle出错:ORA-12505, TNS:listener does not currently know of SID given in connect desc

解决办法:

出现以上的问题是无法识别SID,解决方法如下:

1.找到以下目录,/oracle/product/10.2.0/db_1/network/admin,修改listener.ora,(find -name listener.ora即可找到该文件)为:

    SID_LIST_LISTENER =
        (SID_LIST =
             (SID_DESC =
                   (SID_NAME = PLSExtProc)
                   (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
                   (PROGRAM = extproc)
             )
            (SID_DESC =
                   (GLOBAL_DBNAME = NIE)
                   (ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
                   (SID_NAME = NIE)
            )
        )

    LISTENER =
        (DESCRIPTION_LIST =
              (DESCRIPTION =
                    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC3))
                    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
              )
        )
添加红色字体部分,注意GLOBAL_DBNAME 和SID_NAME 改成你自己的,就是你的Oracle主服务的名字,如我的是OracleServiceORCL,那么就将两处的NIE改为ORCL

重新启动Oracle的监听器服务,我的是 OracleOraDb10g_home1TNSListener

注意:改动只供参考,请根据自己的实际情况改动,复制肯定是无效的!!!!


你可能感兴趣的:(Oracle出错:ORA-12505, TNS:listener does not currently know of SID given in connect desc)