ORA-12154 TNS 無法解析指定的串連標識符

來源:互聯網
上載者:User

ORA-12154 TNS 無法解析指定的串連標識符 .今天資料庫突然串連時報這個錯誤,plsql串連不上,應用程式串連不上,但是sql可以連上。到網上找了半天,也改了半天。其實我的listener.ora 檔案是一直沒有動的。網上的人說改了之後重啟服務就可以。

目錄結構如下:

# listener.ora Network Configuration File: D:\Oracle\product\10.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
# 我加了下面的東西 (SID_DESC=
#     (GLOBAL_DBNAME = ORCL)   
#      (ORACLE_HOME = d:\oracle\product\10.1.0\db_1)       
#      (SID_NAME =ORCL)    
#    )


SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.1.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC=
      (GLOBAL_DBNAME = ORCL)   
      (ORACLE_HOME = d:\oracle\product\10.1.0\db_1)       
      (SID_NAME =ORCL)    
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
      )
    )
  )

其實什麼都不必要改;只需要重啟Oracle listener服務即可解決問題。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.