?? MSSQL Server replication Mechanism master-Slave synchronization practice
Reference Documentation:
Https://msdn.microsoft.com/en-us/library/aa337389.aspx
1.Preparing the Server for Replication: https://msdn.microsoft.com/en-us/library/aa337475.aspx
2.Replicating Data between continuously Connected Servers: https://msdn.microsoft.com/en-us/library/aa337437.aspx
Simply put, install the replication component of SQL Server and select it during the installation process.
1. Create 4 Windows accounts:https://msdn.microsoft.com/en-us/library/aa337433.aspx
<machine_name>\repl_snapshot
<machine_name>\repl_logreader
<machine_name>\repl_distribution
<machine_name>\repl_merge
2. Create a folder and set permissions:https://msdn.microsoft.com/en-us/library/aa337500.aspx
Create folder: C:\Program Files\Microsoft SQL Server\MSSQL. X\mssql\repldata
Permissions are as follows:
? repl_snapshot-full Control
? repl_distribution-read
? repl_merge-read
3. Configure distributed settings and set database permissions on Publisher publishers:
Https://msdn.microsoft.com/en-us/library/aa337499.aspx
4. Create a publication publication and set the appropriate permissions:
Https://msdn.microsoft.com/en-us/library/aa337453.aspx
5. Create a subscriptions subscription and set the appropriate permissions:
Https://msdn.microsoft.com/en-us/library/aa337429.aspx
6. Verify that the subscription is working correctly:
Https://msdn.microsoft.com/en-us/library/aa337388.aspx
Finally, more tables and data are available on the Publisher database, and the data is synchronized to subscribers through the distributed database.
Note: Both publishers and Subscribers here are new and set up on the publisher machine, but they point to a different server.
MSSQL Server replication Mechanism master-Slave synchronization practice