Search This Blog

Loading...

Thursday, September 29, 2011

ORA-02019: connection description for remote database not found

ORA-02019: connection description for remote database not found 
This error is related to database link.

what is database link?
Database link is a medium to connect from one database to another database, database link mostly use to access other database objects like (tables/synonym/view etc).

How to create database link?
create database link [database-link-name]
connect to [username]
identified by [password]
using [tnsname]

NOTE:
database-link-name --> name of the database link 
username --> username of the database from where we want to connect
password --> password of the username
tnsname --> tnsname of the database from where we want to connect

You can check the tnsnames in the tnsnames.ora file located under $ORACLE_HOME/network/admin directory

example:
database 1 == east
database 2 == west

now you want to access west database for employee tables from east database, in this case

first you need to connect to east database with database link privileged user

to create database link you need 'create database link' privilege.

--connect to db
1. conn scott/tiger@east

--create database link
2. create database link west
connect to fgc_east
identified by fgc_east
using 'west_db';

--access tables from west db
select count(*) from employee@west;







No comments: