创建dblink提示创建成功,但是 查询时提示
SQL> select count(*) from mcc_track@mcc59_to_167;
select count(*) from mcc_track@mcc59_to_167
*
ERROR at line 1: ORA-12154: TNS:could not resolve the connect identifier specified
global_names设置为false了已经
alter system set global_names=false;
高手们帮忙看下什么问题啊?谢谢 ------最佳解决方案-------------------- create database link mcc59_to_167 connect to "LINGTU" identified by "lingtu" using '<这里是你要连接的网络服务名,不是别的>';
------其他解决方案--------------------
应该是这样吧:
create database link mcc59_to_167 connect to "LINGTU" identified by "lingtu" using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.12.167)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = lingtu)
)
)
';
create public database link mcc59168
connect to lingtu identified by "lingtu"
using '167';
create public database link mcc59167
connect to lingtu identified by "lingtu"
using '(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=172.17.12.167)(PORT=1521))
)