IT序号网

oracle之Oracle DB链接不起作用

txw1958 2025年12月25日 编程语言 17 0

我们有2个Oracle数据库。假设A和B。

需要创建从A到B的数据库链接。

A是安装在专用网络中的云数据库,通过SSH和本地端口转发,我们可以访问A。

B也安装在专用网络中,通过VPN我们可以访问B。

A和B DB都不能直接访问。

我创建了从A到B的数据库链接。但是它不起作用,出现以下错误

ORA-12170: TNS:Connect timeout occurred 
12170. 00000 -  "TNS:Connect timeout occurred" 
*Cause:    The server shut down because connection establishment or 
           communication with a client failed to complete within the allotted time 
           interval. This may be a result of network or system delays; or this may 
           indicate that a malicious client is trying to cause a Denial of Service 
           attack on the server. 
*Action:   If the error occurred because of a slow network or system, 
           reconfigure one or all of the parameters SQLNET.INBOUND_CONNECT_TIMEOUT, 
           SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT in sqlnet.ora to larger values. 
           If a malicious client is suspected, use the address in sqlnet.log to 
           identify the source and restrict access. Note that logged addresses may 
           not be reliable as they can be forged (e.g. in TCP/IP). 

我在互联网上搜索并尝试了很多次。

有人建议我如何创建从A到B的数据库链接。

提前致谢。

请您参考如下方法:

顾名思义,“TNS:发生连接超时”表示由于任何可能的网络原因(防火墙,物理网络等),我们无法从“A”变为“B”。

尝试以这种方式解决。登录到服务器A,从该计算机上运行tnsping / sqlplus尝试连接到B。这可能涉及设置钱包,sqlnet.ora,tnsnames.ora等,以及根据防火墙等可能导致网络人员参与。

但是,如果您可以建立从服务器A到B的连接,那么只有在这一点上,您才能从A到B获得数据库链接。(显然,从B到A取回数据也是如此)。


评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!