Oracle Database Synchronization script and oracle synchronization script
Prerequisites:
It does not guarantee real-time performance. It only uses job-Based Timing synchronization.
Only data in the table is synchronized, and other data is not saved.
After initialization with a script, you cannot add or delete tables, or change the table results. If this happens, you need to reinitialize the table.
During initialization, it is best to change the database to non-archive mode. Otherwise, a large number of archived logs will be generated.
Method:
Data links are used to copy data from the source to the backup database.
Use triggers to track table data changes, including insert, update, and delete
Job-based timed synchronization
Steps:
Execute three scripts in the source database in sequence: s1.source _ create_sync-trigger. SQL, s2.source _ sync_update_sync_id. SQL, s3.source _ init. SQL.
Create a database chain on the backup database to connect to the source database. The database chain name is remote.
Run the following three scripts on the backup database: d1.destination _ sync_table_data. SQL, d2.destination _ sync_all_data. SQL, and d3.destination _ ininin_tables. SQL.
Call the Stored Procedure sync_all_data to synchronize data.