According to the network situation, may reach 10 seconds of delay, that is, the main database added, deleted, updated content, generally in 10 seconds can be synchronized to the standby database.
Three-minute video operation demo at the bottom, don't forget to read it.
1. Configure distributed Outgoing server
2, New publication
3, here is the introduction of transactional publishing
4, select the table to publish, note: Only the table with the primary key can be published
5, this is a problem, because many tables, we will have this automatic numbering function, but you can modify the stored procedures to achieve this function.
Plus features that use the SET identity_insert xxxtable on
6, after the release of the building, we have to force a new subscription to publish, if you want to sync to more than one machine, as long as the operation several times, select a different subscriber can be.
7, select a subscription server, you can choose multiple units
8, select the name of the database at the Subscriber
9, according to the requirements, choose whether initialization, initialization process, that is, the Subscriber will create the transfer of stored procedures, new tables, synchronization of initial data.
10, through the initialization of the table, such as automatic numbering structure is no use, you need to modify.
11, there is the need for synchronization of the stored procedures, according to their business needs, you can change, such as supporting the function of automatic numbering
I personally use the following actions:
1, the replication of stored procedures on the main database, while according to business needs, the appropriate changes to the contents of the stored procedure
2, prohibit the main data write operation, back up the main database
3, restore the database on the standby server
4, use the copy function
5, open to the main database write
In this way, the table structure of the master data and the standby data is exactly the same.
Look at the picture above, spent not know whether there are three minutes, of course, only to see the words, 10 minutes may not understand that the operation can be.
Video Tutorials Download