Search This Blog

Monday, February 25, 2013

Export/Import table using database link

Source db - db1 from where you want to pull the data
Destination db - db2 to where you want to store the data

In db2,

SQL> create public database link DBLINK connect to BIREPORTING identified by pass$word using 'PROD_DB';

Database link created.

where

DBLINK is the anonymous name you would be giving to the database link
BIREPORTING is the username in db1
pass$word is the password for the username in db1
PROD_DB is the net service name available in db1



SQL> CREATE TABLE BIREPORTING.CHANNEL AS SELECT * FROM REPOSITORY.CHANNEL@DBLINK;

Table created.

SQL> COMMIT;

Commit complete.

No comments:

Post a Comment