Oracle Database Synchronization script and oracle synchronization script

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.