sql devepoler連線orcale資料庫報錯error: ORA-12505
阿新 • • 發佈:2019-01-03
解決orcale資料庫 無法使用sql devepoler連線的問題,參考了很多網上的教程發現好像都不太匹配,無法解決我的問題,參考的很多就不帶參考文獻了。
這個情況適用本教程前提:通過 sql plus是可以正常登入,所有相關服務均以啟動
當時安裝時是可以正常使用,今天突然無法使用,
連線時報出錯誤資訊: 狀態: 失敗 -測試失敗: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
配置檔案(初始的listener.ora檔案內容)
# listener.ora Network Configuration File: F:\Orcale\product\12.1.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = F:\Orcale\product\12.1.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:F:\Orcale\product\12.1.0\dbhome_1\bin\oraclr12.dll") ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-Q0VMUMT)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) )
下面開始在listener.ora內容做文章(新增一些配置內容):
# listener.ora Network Configuration File: F:\Orcale\product\12.1.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = F:\Orcale\product\12.1.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:F:\Orcale\product\12.1.0\dbhome_1\bin\oraclr12.dll") ) (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = F:\Orcale\product\12.1.0\dbhome_1) (SID_NAME = orcl) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-Q0VMUMT)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) )
修改儲存後可以重啟一下服務(我沒有重啟),直接測試連線 ok了。