甲骨文数据库连接



我有 3 台服务器。服务器 0 服务器 1 和服务器 2。

我在Server0中安装了oracle。

Server1 将 tnsnames.ora 配置为连接到 server0 中的 oracle db。

服务器2 无权访问服务器 0。

服务器2 有权访问服务器 1

服务器2 有没有办法通过服务器 1 连接到服务器 0。

在Server2中,我尝试使用JDBC进行连接。安装在Server2中的应用服务器是Tomcat。

通过 SSH 隧道远程访问数据库:

# ssh -N -L [local port]:[database host]:[remote port] [username]@[remote host]
ssh -N -L 9998:<server0-ip>:1521 -i ~/.ssh/id_rsa.pem server1-user@<server1-ip>
sqlplus user/pass@localhost:9998/XE

最新更新