Oracle DBA之配置静态监听(listener registered statically)
為什么80%的碼農都做不了架構師?>>> ??
?(1)listener.ora
?本次實驗將配置靜態監聽到listener L1上,項目SID_LIST_L1為L1的靜態監聽配置信息:
L1 =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = PC1255-20110528)(PORT = 1522))))SID_LIST_L1 =(SID_LIST =(SID_DESC =(SID_NAME = PLSExtProc)(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)(PROGRAM = extproc))(SID_DESC =(GLOBAL_DBNAME = t01)(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)(SID_NAME = t01)))
(2)listener.ora文件編輯好后,使用reload重新讀取該配置文件(reload同時也會重新注冊動態監聽):
(
RELOAD
Purpose
Use the RELOAD command to reread the listener.ora file. This command enables you to add or change statically configured services without actually stopping the listener.
In addition, the database services, instances, service handlers, and listening endpoints that were dynamically registered with the listener will be unregistered and subsequently registered again.
http://download.oracle.com/docs/cd/A97630_01/network.920/a96581/lsnrctl.htm
)
LSNRCTL> status 正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PC1255-20110528)(PORT=1522))) LISTENER 的 STATUS ------------------------ 別名 L1 版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production 啟動日期 24-7月 -2011 22:14:19 正常運行時間 0 天 1 小時 26 分 2 秒 跟蹤級別 off 安全性 ON: Local OS Authentication SNMP OFF 監聽程序參數文件 D:\oracle\product\10.2.0\db_1\network\admin\listener.ora 監聽程序日志文件 D:\oracle\product\10.2.0\db_1\network\log\l1.log 監聽端點概要...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=PC1255-20110528)(PORT=1522))) 服務摘要.. 服務 "t02" 包含 1 個例程。例程 "t02", 狀態 READY, 包含此服務的 1 個處理程序... 服務 "t02XDB" 包含 1 個例程。例程 "t02", 狀態 READY, 包含此服務的 1 個處理程序... 服務 "t02_XPT" 包含 1 個例程。例程 "t02", 狀態 READY, 包含此服務的 1 個處理程序... 命令執行成功 LSNRCTL> reload 正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PC1255-20110528)(PORT=1522))) 命令執行成功 LSNRCTL> status 正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=PC1255-20110528)(PORT=1522))) LISTENER 的 STATUS ------------------------ 別名 L1 版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production 啟動日期 24-7月 -2011 22:14:19 正常運行時間 0 天 1 小時 26 分 8 秒 跟蹤級別 off 安全性 ON: Local OS Authentication SNMP OFF 監聽程序參數文件 D:\oracle\product\10.2.0\db_1\network\admin\listener.ora 監聽程序日志文件 D:\oracle\product\10.2.0\db_1\network\log\l1.log 監聽端點概要...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=PC1255-20110528)(PORT=1522))) 服務摘要.. 服務 "PLSExtProc" 包含 1 個例程。例程 "PLSExtProc", 狀態 UNKNOWN, 包含此服務的 1 個處理程序... 服務 "t01" 包含 1 個例程。例程 "t01", 狀態 UNKNOWN, 包含此服務的 1 個處理程序... 命令執行成功
可以看到狀態為UNKNOWN的靜態監聽已經起起來來了,而狀態為READY的動態監聽由于重新注冊存在一定延時,所以還沒起起來。
等上一段時間后,我們發現動態監聽也起起來了。
(3)以scott用戶進行測試:
測試的時候報了個ORA-12518的錯:
C:\Documents and Settings\Administrator>sqlplus scott/tiger@127.1:1522/t01SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 7月 25 00:01:06 2011Copyright (c) 1982, 2005, Oracle. All rights reserved.ERROR: ORA-12518: TNS: 監聽程序無法分發客戶機連接?
以sys用戶登錄進去,發現是dispatchers設置有問題:
重設dispatchers:
SQL> alter system set dispatchers="(PROTOCOL=TCP) (SERVICE=t01XDB)(dispatchers=3)";系統已更改。(4)以scott用戶進行再測試,問題解決:
(5)總結
配置靜態監聽需要先在listener.ora文件中配置一條SID_LIST_listenername的條目,然后需要用reload重新讀取配置文件,碰到“監聽程序無法分發客戶機連接”的錯誤時,需要設置dispatchers參數。
Ref:
http://www.51testing.com/?uid-117986-action-viewspace-itemid-197431
http://download.oracle.com/docs/cd/A97630_01/network.920/a96581/lsnrctl.htm
http://download.oracle.com/docs/cd/B13789_01/network.101/b10775/listenercfg.htm
原文鏈接: http://blog.csdn.net/t0nsha/article/details/6630494
轉載于:https://my.oschina.net/dtec/blog/46782
總結
以上是生活随笔為你收集整理的Oracle DBA之配置静态监听(listener registered statically)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: gdc2011一些“其他”
- 下一篇: HDU-1878 欧拉回路 判定是否存在