1.在本地安装oracle客户端,在安装客户端目录下查找tnsnames.ora文件
2.添加
A=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =B )(PORT =C ))
)
(CONNECT_DATA =
(SERVICE_NAME =D )
)
)
A:连接服务名
B:访问远程oracleIP
C:远程oracle监听端口
D:连接的数据库名