今天用ODAC连接远程Oracle数据库时,怎么也连接不上,
更改配置文件的tnsname.ora,使之都一样,并完全配置正确还是出现错误,连接不上。
最后请大神一世,原来是数据源名称的问题。
把数据源名称orcl改为gscloud就可以了。
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 223.223.179.17)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
把以上改为:
GSCLOUD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 223.223.179.17)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
时间: 2024-10-23 01:22:26