oracle監聽器動態註冊於靜態註冊的區別
1, oracle 10g 用netca方式建立的都預設為動態註冊方式
2,如果想改為靜態註冊的方式則在listener.ora 中加入如下內容即可
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = JEFF )
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) --就這一段
(GLOBAL_DBNAME = jeff)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = r1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
3,兩者的區別
即靜態註冊,listener不知道例項的狀態,只有在程式透過其連線資料庫時才能知道,如果你想使用遠端管理資料庫就使用靜態監聽
動態註冊:listener實時的都知道例項的狀態,資料庫在關閉的時候會動態的從listener中登出,所以遠端管理資料庫的啟動和停止就不行了。
4,如何判斷是靜態註冊還是動態註冊
(1) 可以透過配置檔案判斷
動態註冊
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oradata\orcl)
)
)
靜態註冊
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oradata\orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = D:\oradata\orcl)
(SID_NAME = ORCL)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl1)
(ORACLE_HOME = D:\oradata\orcl)
(SID_NAME = ORCL)
)
)
透過檢視雖然可以大致看出,但是這種方法並不能和明確的現實資料庫在執行時的實際情況
(2) lsnrclt status
----靜態註冊是這樣的 都是unknow
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "jeff" has 1 instance(s).
Instance "JEFF", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
-----動態註冊是這樣的
Services Summary...
Service "JEFF" has 1 instance(s).
Instance "JEFF", status READY, has 1 handler(s) for this service...
Service "JEFFXDB" has 1 instance(s).
Instance "JEFF", status READY, has 1 handler(s) for this service...
Service "JEFF_XPT" has 1 instance(s).
Instance "JEFF", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
3,有時候會碰到即使listener起來也不能連線到資料庫的情況 。會報一個ORA-12514 ,
執行lsnrctls status 是這個樣子的 ,說明沒有服務沒有註冊進來
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=r1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
解決方法:
alter system register; ---手動將服務註冊到listener中
4,如果我想使用動態註冊,但是又不想使用1521埠怎麼辦
這個時候我們就要用到 local_listener這個引數了,當你使用的是其他埠比如說是1522埠,那麼只要配置這個引數就ok了。
SQL> alter system set local_listener='(DESCRIPTION =
2 (ADDRESS = (PROTOCOL = TCP)(HOST = xys)(PORT = 1522))
3 )';
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29209863/viewspace-2128327/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle監聽靜態註冊和動態註冊Oracle
- oracle監聽動態註冊與靜態註冊Oracle
- Oracle監聽的靜態註冊和動態註冊Oracle
- Oracle監聽的動態註冊與靜態註冊Oracle
- 【監聽】動態註冊和靜態註冊
- oracle監聽動態註冊與靜態註冊[轉帖]Oracle
- oracle監聽器的靜態和動態註冊Oracle
- oracle監聽之動態和靜態註冊Oracle
- 轉載:oracle監聽器的靜態和動態註冊Oracle
- Oracle監聽器的靜態註冊與動態註冊,以及DB_DOMAIN問題OracleAI
- Oracle 動態監聽註冊Oracle
- oracle 監聽器動態與靜態註冊服務_listenerOracle
- ORACLE 動態註冊,靜態註冊,多個監聽,一個監聽多個埠配置Oracle
- oracle的靜態註冊和動態註冊Oracle
- Oracle 靜態監聽註冊詳解Oracle
- 監聽動態註冊
- 動態註冊監聽
- 動態監聽註冊
- Oracle Listener 動態註冊 與 靜態註冊Oracle
- Oracle listener靜態註冊和動態註冊Oracle
- Oracle Listener 動態註冊與靜態註冊Oracle
- 動態註冊和靜態註冊
- 靜態註冊和動態註冊
- 動態和靜態監聽註冊-小魚的理解
- Oracle動態監聽註冊測試Oracle
- rac監聽動態註冊
- 動態註冊監聽Listener
- 【原創】Oracle的動態監聽註冊Oracle
- Oracle listener靜態註冊和動態註冊總結Oracle
- rac監聽不能動態註冊
- oracle listener 靜態和動態註冊Oracle
- listener的靜態註冊與動態註冊詳述
- 靜態註冊和動態註冊總結(zt)
- listener靜態註冊和動態註冊總結
- oracle監聽【非1521埠】動態註冊Oracle
- HPUX 監聽無法動態註冊UX
- Oracle9i中的監聽動態註冊Oracle
- Oracle10g中的靜態註冊及動態註冊問題Oracle