Domanda

I typed the below database link containing database2 info into my database1 editor.

CREATE DATABASE LINK abc
CONNECT TO schema2 IDENTIFIED BY schema2passwd
USING 'database2';

Then I tried to access a database2 table.

select * from products@abc;

I am getting an error TNS:could not resolve the connect identifier specified

Both service names are there in the tnsnames.ora.

This is how my sqlnet.ora looks like

 SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, LDAP)

Not very familiar with DB link, apologize if I am not making sense.

È stato utile?

Soluzione

The TNS alias database2 would need to be in the source database's tnsnames.ora file (assuming that the source database is using local naming). When you talk about both service names existing in "the tnsnames.ora," I'm wagering that you are talking about your client's tnsnames.ora file. A database link is a database object-- it exists only on the database server so it has no access to configuration files created on your client machine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top