Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DB link using connection string ORA-12154: TNS:could not resolve the connect identifier specified

2976391Jun 22 2015 — edited Jun 23 2015

DB link using connection string ORA-12154: TNS:could not resolve the connect identifier specified

I have the next sitution:

DB1 installed on the server1 and DB2 installed on the server2

DB link created on the DB1 to DB2 by command under the dba:

SQL> create public database link link1 connect to user1 identified by password using 'server2:1523/servName'

Database link created.


And if I connect to DB1 from server1 by
# sqlplus / as sysdba

SQL> select count(1) from table1@link1;

  COUNT(1)
----------
      9262
  
Everything is fine

But when I connect by connection string   

# sqlplus "user/password@server1:1521/servName"

I have error:

SQL> select count(1) from table1@link1;
select * from table1@link1
                     *
ERROR at line 1:
ORA-12154: TNS:could not resolve the connect identifier specified


To resolve this issue I added EZCONNECT into sqlnet.ora file as recommended in the error description:
NAMES.DIRECTORY_PATH = (EZCONNECT, TNSNAMES)
But it doesnt' work

Could you help me, please.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2015
Added on Jun 22 2015
9 comments
2,660 views