国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 數(shù)據(jù)庫(kù) > Oracle > 正文

Oracle客戶穿越防火墻難題

2024-08-29 13:45:05
字體:
供稿:網(wǎng)友

  
近來由于工作需要,在Windows xp平臺(tái)上安裝了Oracle9i數(shù)據(jù)庫(kù)作為測(cè)試之用,一切正常。但當(dāng)客戶機(jī)連接服務(wù)器時(shí)卻總是超時(shí),我首先想到了防火墻,當(dāng)我打開1521端口時(shí),連接操作仍然失敗。 我又懷疑網(wǎng)絡(luò)有問題,用telnet server_ip:1521嘗試,連接被接受,說明1521端口已經(jīng)被打開。

沒有辦法,查詢Oracle資料后才明白,network listener 只起一個(gè)中介作用,當(dāng)客戶連接它時(shí),它根據(jù)配置尋找到相應(yīng)的數(shù)據(jù)庫(kù)實(shí)例進(jìn)程,然后spawned一個(gè)新的數(shù)據(jù)庫(kù)連接,這個(gè)連接端口由network listener傳遞給客戶機(jī),此后客戶機(jī)就不再和打交道了,即使listener停止了工作。這個(gè)新的連接端口是不可預(yù)知的,因而會(huì)被防火墻阻止。

Windows Socket2 規(guī)范有一個(gè)新的特性,就是Shared Socket, 所謂共享套接字是指一個(gè)進(jìn)程共享另一個(gè)進(jìn)程的套接字(詳見MSDN相關(guān)參考)。假如讓network listener與數(shù)據(jù)庫(kù)服務(wù)進(jìn)程共享套接字,那么連接端口就不會(huì)變化。

如何設(shè)置 Shared Socket?

在注冊(cè)表:HKEY_LOCAL_MACHINE OFTWARE/ORACLE/HOME0上新建一個(gè)字符串值:USE_SHARED_SOCKET=true。假如安裝了多個(gè)目錄,則每個(gè)類似的目錄都要設(shè)置:HKEY_LOCAL_MACHINE OFTWARE/ORACLE/HOMEx (x目錄編號(hào))

設(shè)置后要求重新啟動(dòng)實(shí)例(只重啟listener發(fā)現(xiàn)沒有效果)

引用資料:
http://www.computer-book-authors.org/aud_450.htm

典型問題:
http://www.lazydba.com/oracle/0__37815.Html

when a client connects to a listener it uses port 1521 at the client machine. the listener then returns to the client thru a different port. The 1521 port is closed and the db connection uses the new port for communicating with the client. i want the listener to return to the client using port 1521, how?

metalink says use the use_shared_socket parameter, but its still not working. i set the parameter to true in the sys env and in the registry.
....

Oracle 原文:

USE_SHARED_SOCKET

You can set the USE_SHARED_SOCKET parameter to TRUE to enable the use of shared sockets. If this parameter is set to TRUE, the network listener passes the socket descriptor for client connections to the database thread. As a result, the client does not need to establish a new connection to the database thread and database connection time imPRoves. Also, all database connections share the port number used by the network listener, which can be useful if you are setting up third-party proxy servers.

On Windows NT 4.0 Service Pack3 or earlier, enabling this option precludes bringing the network listener up or down in a case where a database connection spawned by the network listener is active. Therefore, you may
need to shut down all of the databases serviced by a network listener before you can bring down and restart a network listener. This results from the way shared sockets have been implemented in WINSOCK2. WINSOCK2 does not
allow a reliable thread to a network listener on any port on which other connections are also active. This is not an issue on Windows NT 4.0 Service Pack 4 orlater. Oracle recommends that you upgrade to Windows NT 4.0 Service Pack 4 if you intend to set this parameter.

This parameter only works in dedicated server mode in a TCP/IP environment. If this parameter is set,
you cannot use the 8.1.5 listener to spawn Oracle 7.x databases. To spawn an Oracle 8.0.x database from an 8.1.5 listener

==============

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 定南县| 莱州市| 曲靖市| 拜泉县| 嵩明县| 舟山市| 天长市| 伽师县| 柳州市| 永兴县| 富顺县| 册亨县| 邢台县| 吉木乃县| 微博| 枣阳市| 昌乐县| 建瓯市| 芒康县| 怀集县| 湘阴县| 冀州市| 越西县| 宝清县| 徐汇区| 襄樊市| 时尚| 泽库县| 抚顺市| 电白县| 吴忠市| 卫辉市| 开封县| 潢川县| 竹山县| 遂溪县| 张掖市| 新密市| 阳曲县| 千阳县| 南澳县|