熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

oracle服務端和客戶端之間的網絡監聽設置

2022-06-13   來源: Oracle 

  下面為您介紹的是oracle服務端和客戶端之間的網絡監聽設置如果您在oracle <;服務端和客戶端之間的網絡監聽設置方面遇到過類似的問題不妨一看

  oracle服務端和客戶端之間的網絡監聽設置

  假如我現在有兩個數據庫kkman和orcl現在我想在服務端設立兩個監聽來處理從客戶端發過來的連接請求

  

  第一種多端口監聽

  服務端listenerora配置

  # listenerora Network Configuration File: C:\oracle\product\\db_\NETWORK\ADMIN\listenerora

  # Generated by Oracle configuration tools

  

  SID_LIST_LISTENERORCL =

  (SID_LIST =

      (SID_DESC =

        (GLOBAL_DBNAME = ORCL)

        (SID_NAME = ORCL)

      )

      (SID_DESC =

        (GLOBAL_DBNAME = KKMAN)

        (SID_NAME = KKMAN)

      )

  )

  

  LISTENER =

  (DESCRIPTION_LIST =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = rac)(PORT = ))

        (ADDRESS = (PROTOCOL = TCP)(HOST = rac)(PORT = ))

      )

  )

  服務端和客戶端tnsnamesora配置

  # tnsnamesora Network Configuration File: C:\oracle\product\\client_\NETWORK\ADMIN\tnsnamesora

  # Generated by Oracle configuration tools

  

  KKMAN =

  (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      )

      (CONNECT_DATA =

        (SERVICE_NAME = KKMAN)

      )

  )

  

  ORCL =

  (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      )

      (CONNECT_DATA =

        (SERVICE_NAME = orcl)

      )

  )

  重新啟動監聽

  在服務端打開cmd運行lsnrctl stop和lsnrctl   start

  多監聽單端口

  服務端listenerora配置

  # listenerora Network Configuration File: C:\oracle\product\\db_\NETWORK\ADMIN\listenerora

  # Generated by Oracle configuration tools

  

  SID_LIST_LISTENERORCL =

  (SID_LIST =

      (SID_DESC =

        (GLOBAL_DBNAME = ORCL)

        (SID_NAME = ORCL)

      )

      (SID_DESC =

        (GLOBAL_DBNAME = KKMAN)

        (SID_NAME = KKMAN)

      )

  )

  

  LISTENER =

  (DESCRIPTION_LIST =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = rac)(PORT = ))

       )

  )

  服務端和客戶端tnsnamesora配置

  # tnsnamesora Network Configuration File: C:\oracle\product\\client_\NETWORK\ADMIN\tnsnamesora

  # Generated by Oracle configuration tools

  

  KKMAN =

  (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      )

      (CONNECT_DATA =

        (SERVICE_NAME = KKMAN)

      )

  )

  

  ORCL =

  (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

      )

      (CONNECT_DATA =

        (SERVICE_NAME = orcl)

      )

  )

  重新啟動監聽

  在服務端打開cmd運行lsnrctl stop和lsnrctl   start


From:http://tw.wingwit.com/Article/program/Oracle/201311/18299.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.