How to query remote database?

I've got  problem querying remote database. After command:
select * from user.table@remote;
I get a message: "ORA-02019: connection description for remote database not found ".
I don't know what am I doing wrong. I've already defined a database link named 'remote'.
I've also put 'remote' in /etc/hosts file ('remote' is>the name of the remote server).
Then I've defined an appropriote entry in tnsnames.ora file.



The Entry in /etc/hosts is not necessary.
You need an SQL*Net Connection between both Databases.
The Client Database needs a correct entry in "tnsnames.ora"
The Server Database needs a correct entry in "listener.ora"
(Before editing listener.ora, you should stop the listener e.g. "lsnrctl stop")
you should also check "sqlnet.ora", but normally it´s ok.

after editing "listener.ora" you should start the listener again "lsnrctl start".

To check, wether SQL*Net connection is ok, try on the client:

ping remote   // is TCP/IP OK ?
tnsping remote // is SQL*Net correct configured ?
sqlplus username/password@remote    // can i connect to the database.

If theese 3 Tests are OK, your database link should work.
 
 
 
 

Hosted by www.Geocities.ws

1