Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferring data between databases 1

Status
Not open for further replies.
Dec 17, 2002
41
US
Oracle beginner...

I have a script written that will transfer data from our production db to our test db to keep a mirror image of the production to test on. Looks like this.

INSERT INTO ORATESTDB.THIS_TABLE
SELECT *
FROM ORAAPP.THIS_TABLE;

This worked just fine until they decided to move the db to a new server. Now I need to know if I can do something similar to what I have above to move the data from the old production db to the new production db on a different server. If it's possible, I am then going to attempt to write a perl script to do the same thing so we can accomplish some of the dba stuff from the web. If you need more info. let me know, thanks.
 
Yes, you can do the same thing - so long as you can access the new DB from the old server via a network. The easiest think to do would probably be to set up a database link on the new database that points to the old database - lets say you call it OLD_DB_LINK. The you could write your query like this to run on the new database:

INSERT INTO ORAAPP.THIS_TABLE
SELECT *
FROM ORAAPP.THIS_TABLE@OLD_DB_LINK;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top