Now big situation is as follows:
1) the table structure and B in table structure is roughly same, but slightly different, such as A certain fields of B no, fields in A structure for the Number, B is A VARCHAR,
2) the amount of data is big also, each table of 1 million less, many have tens of millions, and some BLOB storage or attachment file,
3) two database must not, on a server is across the Internet,
Predecessors, please can you give some advice, I use Oracle code or using JAVA to do? Requirements are as follows:
1) ensure the integrity of the data, data is not lost,
2) can't too low efficiency,
3) considering the ease of operation, as far as possible because I am a to provide code, let them go to operation,
CodePudding user response:
1, the use of stored procedure insert into insert (suggest this operation, although may be a little slower, but more flexible, such as primary key conflict can be inserted into a backup the data table records, etc.)2, the use of exp import
Before the import need to analyze the differences between two tables and in the local test, then the library A, EXP in the local area network (LAN) library B, operating speed slow Internet is not so stable
CodePudding user response:
Considering the data quantity and sustainability of the business,If can pause, can consider to use expdp export import or use the rman backup and recovery
CodePudding user response:
The source database backup, first in the same network segment as the object library, again through the dblink way do synchronization, insert the select way can;CodePudding user response:
PLSQL has a function to compare differences in AB twoDifferences can find out the first imp and additional handling differences between table data