您好,登錄后才能下訂單哦!
oracle動態注冊和靜態注冊的區別:動態監聽不需要在listener.ora文件中記錄關于數據的任何信息,只需要將監聽器的配置信息寫入到該文件。例如:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))
(ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
)
客戶端的tnsnames.ora配置信息,需要加入每個service_name,其他的任何東西不需要改動,例如
YUCESHI1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test1)
)
)
YUCESHI2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test2)
)
)
YUCESH3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test3)
)
)
動態監聽步驟:
服務器端配置如下:
設置service_names:
alter system set service_names=test1,test2,test3;
2. 編寫listener.ora文件:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))
(ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
)
3.重新啟動oracle實例,這樣做才能使service_names生效。(前提是oracle處于open狀態下才執行)
conn /as sysdba;
shutdown immediate;
startup;
客戶端配置:
1.編輯tnsnames.ora,保存后立即生效。
YUCESHI1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test1)
)
)
YUCESHI2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test2)
)
)
YUCESH3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test3)
)
)
以上動態注冊配置完畢。以上改為靜態注冊步驟。
只需要在服務器端修改listener.ora
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。