手工配置listener.ora檔案及TNS-01201錯誤
今天嘗試手工編寫listener.ora檔案,結果遇到了如下錯誤:
TNS-01201: Listener cannot find executable /u01/app/oracle/OracleHome/db10g/bin/extproc2 for SID PLSExtProc
改了幾次好容易才找到原因,雖然原因很簡單,但是關於listener.ora及tnsnames.ora在內的檔案有幾個簡單的語法需要注意,這個在官方文件上也有類此解釋。
[oracle@ocm1 admin]$ vi listener.ora
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ocm1)(PORT = 1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/OracleHome/db10g)
(PROGRAM = extproc2)
)
)
[@more@]
~當啟動監聽時:
~[oracle@ocm1 admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 06-DEC-2012 07:39:02
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /u01/app/oracle/OracleHome/db10g/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /u01/app/oracle/OracleHome/db10g/network/admin/listener.ora
Log messages written to /u01/app/oracle/OracleHome/db10g/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
TNS-01201: Listener cannot find executable /u01/app/oracle/OracleHome/db10g/bin/extproc2 for SID PLSExtProc
Listener failed to start. See the error message(s) above...
改了幾次好容易才找到原因,雖然原因很簡單,但是關於listener.ora及tnsnames.ora在內的檔案有幾個簡單的語法需要注意,這個在官方文件上也有類此解釋。
尤其是Oracle? Database Net Services Reference的Part II Configuration Parameters章節的相關內容值得看一遍。
其中第三章的如下內容已經講述了最基本但是很重要的語法:
Configuration File Syntax OverviewThe Oracle Net Services configuration files consist of parameters which include keyword-value pairs. Keyword-value pairs are surrounded by parentheses:
parameter=(keyword=value)
Some keywords have other keyword-value pairs as their values:
(keyword=
(keyword=value)
(keyword=value))
For example, the address portion of a local naming configuration file (tnsnames.ora) might include the following lines:
(ADDRESS=
(PROTOCOL=tcp)
(HOST=sales-server)
(PORT=1521))
Set up configuration files so that indentation reflects what keyword is the parent or owner of other keyword-value pairs.
Even if you do not choose to indent your files in this way, you must indent a wrapped line by at least one space, or it will be misread as a new parameter. The following layout is acceptable:
(ADDRESS=(PROTOCOL=tcp)
(HOST=sales-server)(PORT=1521))
The following layout is not acceptable:
(ADDRESS=(PROTOCOL=tcp)
(HOST=sales-server)(PORT=1521))
最終將完整的listener.ora檔案內容作為備忘記錄到這兒:
動態監聽時:
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ocm1)(PORT = 1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/OracleHome/db10g)
(PROGRAM=extproc)
)
)
靜態監聽時(建設sid為PROD):
~
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ocm1)(PORT = 1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/OracleHome/db10g)
(PROGRAM=extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = PROD)
(ORACLE_HOME = /u01/app/oracle/OracleHome/db10g)
(SID_NAME=PROD)
) )
~
~
~
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18841027/viewspace-1059866/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 寶塔皮膚安裝配置檔案有錯誤
- pyinstaller 打包後讀取 ini 配置檔案路徑錯誤,怎麼定位配置檔案
- 【監聽】listener.ora檔案理解
- 多個ORACLE資料庫例項下listener.ora檔案配置Oracle資料庫
- 手工建立控制檔案
- yml 配置檔案提示錯誤mapping values are not allowed in this contextAPPContext
- listener.ora、sqlnet.ora、tnsnames.ora的關係以及手工配置舉例SQL
- Listener.ora、sqlnet.ora、tnsnames.ora三個配置檔案區別SQL
- 手工建庫---控制檔案
- 手工恢復控制檔案
- 專案提示錯誤找不到git檔案Git
- 平臺配置及測試錯誤提示及解決方案
- MySQL 配置檔案位置及命名。MySql
- 資料檔案拷貝檔案頭驗證錯誤
- Oracle 網路配置用到的sqlnet.ora, tnsnames.ora, listener.ora檔案OracleSQL
- 【RAC】RAC安裝錯誤手工解除安裝
- .gitignore檔案配置以及gitee提交報Push rejected...錯誤解決Gitee
- Include檔案易犯編譯錯誤編譯
- Python檔案讀寫--錯誤一Python
- Oracle的網路三大配置檔案(sqlnet.ora、tnsnames.ora、listener.ora)OracleSQL
- 2.5.2. 監聽程式(listener)配置——2.5.2.3. 手工編輯監聽器配置檔案
- PHP簡介及配置檔案解析PHP
- 手動配置WCF宿主的.config檔案遇到的幾種錯誤
- Linux中常見的檔案讀寫錯誤問題及解決方法!Linux
- 認識 Linux 檔案屬性及檔案配置(轉)Linux
- standby新增檔案錯誤的解決方法
- php檔案操作錯誤程式碼說明PHP
- 列印當前python檔案錯誤行Python
- PbootCMS錯誤提示:模板檔案不存在boot
- PbootCMS錯誤提示:檔案上傳失敗boot
- HTTP 錯誤 500.19 配置檔案錯誤 ( 0x8007000d,0x80070032)HTTP
- 手工清理ASM裡面的垃圾檔案ASM
- DATA GUARD手工管理資料檔案
- “您的設定/配置檔案”出錯
- ubuntu sudoers配置錯誤Ubuntu
- Oracle ASM 配置錯誤OracleASM
- .net 在配置檔案中配置404路徑出錯
- 手工刪除歸檔日誌導致RMAN備份時報ORA-19625錯誤