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

WIN平台下僅

2013-11-13 15:50:49  來源: Oracle 

  windows平台下僅開一個端口讓Oracle穿過防火牆
  很多人問這個問題查了大量資料也沒有找到真正完全解決的經過多次試驗終於成功實現建議版主此貼加精
  
  Oracle客戶端連接服務器首先去找監聽端口服務器的監聽端口再向server process進程發出請求並返回一個隨機端口返回給客戶端客戶端再來連接這個端口
  
  這樣就給服務器上的防火牆設置帶來了麻煩這個端口是隨機的如何開放
  
  windows 平台上的這個問題成了一大難題很多論壇都有人問但很少有人能解決 unix平台不用擔心系統自動會解決這個問題
  
  Matalink上提供了三種解決辦法實際上USE_SHARED_SOCKET 是最有效最方便的
  
  但經過無數次實現仍然沒有成功最後終於發現是Oracle 的bug
  
  需要打補丁升級到Oracle
  不同版本注冊表位置不一樣
   Oracle for NT/k \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME<#> (# is your desired homedir)
   Oracle for NT/k Doesnt work in Oracle for NT/k
   Oracle for NT/k \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
  
  需要在MTS模式下(共享模式)Oracle默認是專用模式
  
  經試驗發現如果不在init文件中設參數的話Oracle仍然會要求一個隨機端口和端口來共同通訊只是這個隨機端口並不隨客戶端會話和登錄的變化而變化在沒有重啟服務器時是固定的
  
  (試驗發現在專用模式下每次連接oracle服務器會按+方式提供一個非的端口
  
  所以還需要在initora文件的最後加上一條參數
  
  mts_dispatchers=(address=(protocol=tcp)(host=myoradb)(port=))(dispatchers=)
  
  這樣才真正實現只用一個端口穿過防火牆
  
  參考資料
  Oracle uses dynamic ports under windows NT because of a bug in windows so oracle cant use shared sockets This bug got fixed with service pack I think By default oracle uses the dynamic ports without caring which service pack is installed There is a registry setting to force oracle to use shared sockets The parameter is (what a surprise!) USE_SHARED_SOCKET in LOCAL_MACHINE\Software\Oracle\HomeX where X is your desired homedir This parameter should be set to TRUE Theres a whitepaper from oracle for this too somewhere on their site Anyway this parameter doesnt work for Some users reported that it worked with but termiates every conection immediately
  
  Contributed by Arne Brutschy (abrutschy@xylonde) on July
  
  Actually I want to establish a replication system in my local machine for replicating objects(tables) from remote database to a local database what data security option i must take in to account I request you to give me the detail description like which protocal must be used and what parameter must be set in initora filesqlnetora and listenerora file and what other steps to be taken I would be very thankful to you if you kindly describe the thingsactually i want to maintain the data privacy which happens between remote and local database while replication take place any one can trap the net and extract the data so i need to stop that
  
  I would be very thankful to you this is a request please mail me on the address p_v_r
  
  regards pvraju
  
  Contributed by pvraju (p_v_r) on October
  
  Modify Windows registry
  
  USE_SHARED_SOCKET = TRUE
  
   Oracle for NT/k \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME<#> (# is your desired homedir)
  
   Oracle for NT/k Doesnt work in Oracle for NT/k
  
   Oracle for NT/k \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
  
   FAQ Site
  

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