ORACLE 動態註冊和靜態註冊的區別

2021-07-02 00:10:58 字數 2182 閱讀 8461

1, oracle 10g 用netca方式建立的都預設為動態註冊方式

listener =

(description_list =

(description =

(address = (protocol = tcp)(host = r1)(port = 1521))

(address = (protocol = ipc)(key = extproc0))))

3,兩者的區別

即 靜態註冊,listener不知道例項的狀態,只有在程序通過其連線資料庫時才能知道,如果你想使用遠端管理資料庫就使用靜態監聽

動態註冊:listener實時的都知道例項的狀態,資料庫在關閉的時候會動態的從listener中登出,所以遠端管理資料庫的啟動和停止就不行了。

4,如何判斷是靜態註冊還是動態註冊

1,可以通過配置檔案判斷,靜態註冊如上。

2,lsnrclt status

----靜態註冊是這樣的 都是unknow

services summary...

service "pl***tproc" has 1 instance(s).

instance "pl***tproc", 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 "pl***tproc" has 1 instance(s).

instance "pl***tproc", 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 "pl***tproc" has 1 instance(s).

instance "pl***tproc", 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 )';

[@more@]

動態註冊和靜態註冊

1 四大元件只有廣播接收者可以不在清單檔案中註冊 2 靜態註冊 在清單檔案中通過宣告乙個receiver節點指定intent filter,這種方式就是靜態註冊 3 動態註冊 registerreceiver receiver,filter 4 登出的方法 unregisterreceiver re...

動態註冊和靜態註冊的區別

動態註冊的廣播會受activity的生命週期的影響,當activity銷毀的時候,廣播就失效了。而靜態註冊的廣播,即使activity銷毀了,仍然可以收到廣播。更牛掰的是即使殺死程序,仍然可以收到廣播。動態註冊的廣播要想一直監聽可以註冊到server裡面區監聽 public class update...

監聽的動態註冊和靜態註冊

動態監聽 oracle例項在啟動時,或使用命令alter system register 或每隔一分鐘,pmon程序會向監聽進行動態註冊,pmon程序根據init.ora中的instance name,service names兩個引數將例項和服務動態註冊到listener中 oracle 執行後,...