database link error (ORA-02085) when querying "select"
419562May 5 2004 — edited May 7 2004I had this frustrating problem using a remote database link. the remote database entry in my tnsNames.ora is as following:
OGRE.PSAMER.PS.GE.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.65.5.263)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = ogre))
)
I also commented out this in my sqlNet.ora
# SQLNET.AUTHENTICATION_SERVICES= (NTS)
----------------------------
I tried this in SQL plus:
SQL> create database link ogredb connect to icas identified by icas using 'OGRE.PSAMER.PS.GE.COM';
Database link created.
----------------------------
Then I issued this:
SQL> select * from Sensors@ogredb;
select * from Sensors@ogredb
*
ERROR at line 1:
ORA-02085: database link OGREDB.US.ORACLE.COM connects to OGRE
--------------------------
This looks wield to me. Why did it add an US.ORACLE.COM to my link?
-------------------------------------------
-------------------------------------------
I also tried
SQL> create database link ogredb.PSAMER.PS.GE.COM connect to icas identified by icas using 'OGRE.PSAMER.PS.GE.COM';
Database link created.
SQL> select * From sensors@ogredb.PSAMER.PS.GE.COM;
select * From sensors@ogredb.PSAMER.PS.GE.COM
*
ERROR at line 1:
ORA-02085: database link OGREDB.PSAMER.PS.GE.COM connects to OGRE
Does anybody know what I did wrong? Please help. Thanks,
Changsong