溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

oracle動態(tài)注冊和靜態(tài)注冊監(jiān)聽器

發(fā)布時間:2020-10-21 13:31:14 來源:網(wǎng)絡(luò) 閱讀:279 作者:yujianglei 欄目:關(guān)系型數(shù)據(jù)庫

     oracle動態(tài)注冊和靜態(tài)注冊的區(qū)別:動態(tài)監(jiān)聽不需要在listener.ora文件中記錄關(guān)于數(shù)據(jù)的任何信息,只需要將監(jiān)聽器的配置信息寫入到該文件。例如:

 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)
    )
  )


動態(tài)監(jiān)聽步驟:

服務(wù)器端配置如下:

  1. 設(shè)置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狀態(tài)下才執(zhí)行)

   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)
    )
  )


以上動態(tài)注冊配置完畢。以上改為靜態(tài)注冊步驟。

只需要在服務(wù)器端修改listener.ora

 


   



向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI