`
frank1998819
  • 浏览: 758182 次
  • 性别: Icon_minigender_1
  • 来自: 南京
文章分类
社区版块
存档分类

ORA-12505, TNS:listener does not currently know of SID given in connect desc (转)

 
阅读更多

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

 

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

   

    # listener.ora Network Configuration File: /opt/oracle/product/10.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.

    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 = localhost.localdomain)(PORT = 1523))
              )
        )
添加红色字体部分,注意GLOBAL_DBNAME 和SID_NAME 改成你自己的。

 

2.启动TNS监听:lsnrctl start

3.查看监听状态:lsnrctl status

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics