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.