电脑故障

位置:IT落伍者 >> 电脑故障 >> 浏览文章

WIN平台下仅


发布日期:2024/3/7
 

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

上一篇:LogonTriggerExample登陆例子

下一篇:漫谈镜像(备份)网站的几种有效方法