国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 安乡县| 蕉岭县| 理塘县| 隆德县| 塔河县| 梅州市| 灵璧县| 简阳市| 漳平市| 开原市| 安达市| 凌源市| 江油市| 安丘市| 伊春市| 无锡市| 万安县| 双辽市| 马公市| 会同县| 乾安县| 临桂县| 交城县| 壤塘县| 会理县| 迭部县| 保德县| 焉耆| 宜阳县| 怀来县| 大同县| 杭锦后旗| 永安市| 乡宁县| 连南| 含山县| 弥渡县| 额尔古纳市| 万州区| 昆明市| 临夏市|