connect to INTERFACE identified by SCOINTERFACE
using 'zcytest';
然后 Select * From ALL_NEED_ADD@zcytest 报以上错误
TNSNAME.ORA文件内容:
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
我用intferface/scointerface@zcytest登陆数据库都没有问题,为何用DBLINK就不行呢
14 个解决方案
#1
后台tnsping zcytest
看看返回什么结果
看看返回什么结果
#2
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
改为
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=zcytest)
)
)
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
改为
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=zcytest)
)
)
#3
C:\Documents and Settings\bridge.ZHANGCHENYU>tnsping zcytest
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 12-1月 -2
007 15:15:28
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora81\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 133.37.8.68)(PORT = 1521))) (CONNECT_DATA = (SID = acct1)))
OK(10毫秒)
C:\Documents and Settings\bridge.ZHANGCHENYU>
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 12-1月 -2
007 15:15:28
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora81\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 133.37.8.68)(PORT = 1521))) (CONNECT_DATA = (SID = acct1)))
OK(10毫秒)
C:\Documents and Settings\bridge.ZHANGCHENYU>
#4
改连接串
按照我上面的
按照我上面的
#5
晕,别个的数据库SID=ACCT1,改成zcytest不是连登陆都不能成功了
#6
你的数据库的sid是acct1,不是zcytest
改成
ACCT1=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
然后重建你的db_link,再试试
改成
ACCT1=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
然后重建你的db_link,再试试
#7
改了,错误一样,命名改变不是错误的原因
#8
select sysdate from dual@ZCYTEST;
有无反馈结果,结果是什么?
有无反馈结果,结果是什么?
#9
检查$Oracle_Home\network\admin\sqlnet.ora,看看NAMES.DIRECTORY_PATH这个常量的值。需要设置为:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
#10
# SQLNET.ORA Network Configuration File: D:\oracle\ora81\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
设置成这样了,还是报原来一样的错误
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
设置成这样了,还是报原来一样的错误
#11
select sysdate from dual@ZCYTEST;
有无反馈结果,结果是什么?
有无反馈结果,结果是什么?
#12
SQLNET.AUTHENTICATION_SERVICES= (NTS)
两边都注释掉
两边都注释掉
#13
还有,我说的tnsnames.ora的配置你在你的数据库的server端,
简单说:
数据库a建立到数据库b的db_link
必须在数据库a的server端的tnsnames.ora里面配置数据库b的连接串。
而不是在你的client端配置了数据库b的连接串db_link就好使了。
简单说:
数据库a建立到数据库b的db_link
必须在数据库a的server端的tnsnames.ora里面配置数据库b的连接串。
而不是在你的client端配置了数据库b的连接串db_link就好使了。
#14
对了,你最后哪个意见是对的,我想起了,虽然我本机装得是ORACLE服务器版本,但我建立得DBLINK是在另外一台ORACLE数据库服务器上,应该是改这台数据库得TNSNAMES.ORA,而不是本机得TNSNAME.ORA,OK,谢谢马上结分
#1
后台tnsping zcytest
看看返回什么结果
看看返回什么结果
#2
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
改为
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=zcytest)
)
)
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
改为
zcytest=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=zcytest)
)
)
#3
C:\Documents and Settings\bridge.ZHANGCHENYU>tnsping zcytest
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 12-1月 -2
007 15:15:28
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora81\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 133.37.8.68)(PORT = 1521))) (CONNECT_DATA = (SID = acct1)))
OK(10毫秒)
C:\Documents and Settings\bridge.ZHANGCHENYU>
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 12-1月 -2
007 15:15:28
Copyright (c) 1997 Oracle Corporation. All rights reserved.
已使用的参数文件:
D:\oracle\ora81\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 133.37.8.68)(PORT = 1521))) (CONNECT_DATA = (SID = acct1)))
OK(10毫秒)
C:\Documents and Settings\bridge.ZHANGCHENYU>
#4
改连接串
按照我上面的
按照我上面的
#5
晕,别个的数据库SID=ACCT1,改成zcytest不是连登陆都不能成功了
#6
你的数据库的sid是acct1,不是zcytest
改成
ACCT1=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
然后重建你的db_link,再试试
改成
ACCT1=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS =(PROTOCAL=TCP)(HOST=133.37.8.68)(PORT=1521))
)
(CONNECT_DATA =
(SID=ACCT1)
)
)
然后重建你的db_link,再试试
#7
改了,错误一样,命名改变不是错误的原因
#8
select sysdate from dual@ZCYTEST;
有无反馈结果,结果是什么?
有无反馈结果,结果是什么?
#9
检查$Oracle_Home\network\admin\sqlnet.ora,看看NAMES.DIRECTORY_PATH这个常量的值。需要设置为:NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
#10
# SQLNET.ORA Network Configuration File: D:\oracle\ora81\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
设置成这样了,还是报原来一样的错误
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
设置成这样了,还是报原来一样的错误
#11
select sysdate from dual@ZCYTEST;
有无反馈结果,结果是什么?
有无反馈结果,结果是什么?
#12
SQLNET.AUTHENTICATION_SERVICES= (NTS)
两边都注释掉
两边都注释掉
#13
还有,我说的tnsnames.ora的配置你在你的数据库的server端,
简单说:
数据库a建立到数据库b的db_link
必须在数据库a的server端的tnsnames.ora里面配置数据库b的连接串。
而不是在你的client端配置了数据库b的连接串db_link就好使了。
简单说:
数据库a建立到数据库b的db_link
必须在数据库a的server端的tnsnames.ora里面配置数据库b的连接串。
而不是在你的client端配置了数据库b的连接串db_link就好使了。
#14
对了,你最后哪个意见是对的,我想起了,虽然我本机装得是ORACLE服务器版本,但我建立得DBLINK是在另外一台ORACLE数据库服务器上,应该是改这台数据库得TNSNAMES.ORA,而不是本机得TNSNAME.ORA,OK,谢谢马上结分