I have 2 DB with the same schema on different servers. I need to copy data from table T to the same table T in test database in different server and network.
What is the easiest way to do it? I heard that data can be dumped to flat file and than inserted into database. How does it works? Can this be achieved using sqlplus and oracle database?
Thank you!
Use Oracle export to export a whole table to a file, copy the file to serverB and import.
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.
If you have db listeners up on each server and tnsnames knows about both, you can directly:
Look at the remote table section:
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.