How copy data from one database to another on different server?

旧时模样 提交于 2019-12-02 05:32:08

Use Oracle export to export a whole table to a file, copy the file to serverB and import.

http://www.orafaq.com/wiki/Import_Export_FAQ

You can use rsync to sync an oracle .dbf file or files to another server. This has problems and syncing all files works more reliably.

For groups of records, write a query to build a pipe-delimited (or whatever delimiter suits your data) file with rows you need to move. Copy that file to serverB. Write a control file for sqlldr and use sqlldr to load the rows into the table. sqlldr is part of the oracle installation.

http://www.thegeekstuff.com/2012/06/oracle-sqlldr/

If you have db listeners up on each server and tnsnames knows about both, you can directly:

insert into mytable@remote 
select * from mytable
  where somecolumn=somevalue;

Look at the remote table section:

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9014.htm

If this is going to be an ongoing thing, create a db link from instance@serverA to instance@serverB. You can then do anything you have permissions for with data on one instance or the other or both.

http://psoug.org/definition/CREATE_DATABASE_LINK.htm
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!