How do I synchronize the contents of two SQL Server databases?
Program code can have version management CVS for synchronization management, but database synchronization is very troublesome, can only change one after another, if you forget to change the other often caused two database structure or content inconsistent. Do you have any good methods?
Distribution and Replication
To implement a database synchronization operation with a push subscription
Mass and bulk data can be processed using the synchronization mechanism of the database:
//
Description
For ease of operation, all operations operate at the Publisher (distributor) and use push mode
Use the push subscription method in the client machine.
Have questions contact Author: zlp321001@hotmail.com
Test passed
//
--1: Environment
Server environment:
Machine Name: zehuadb
Operating system: Windows Server
Database version: SQL Server Personal Edition
Client
Machine Name: ZLP
Operating system: Windows Server
Database version: SQL Server Personal Edition
--2: Build user account
Create a domain user account on the server side
My Computer Management-> Local Users and Groups-> user-> Build
Username:zlp
Userpwd:zlp
--3: Reboot Server MSSQLServer
My Computer-> control face version-> management tools-> Service->mssqlserver Service
(Change to: domain user account, our new ZLP user. \ZLP, password: ZLP)
--4: Installing the Distributor
A: Configuring the Distributor
Tools-> Replication-> Configure Publishing, subscribers, and distribution-> next-> next (all with default configuration)
B: Configuring the Publisher
Tools-> Replication-> Create and manage Publications-> Select the database to publish (SZ)-> next-> Snapshot publishing-> next->
Select what to publish-> next-> next-> next-> finish
C: Force configuration Subscriber (push mode, pull mode is similar to this)
Tools-> Replication-> Configure Publishing, subscribers, and distribution-> subscribers-> new->sql
Server database-> Enter client server name (ZLP)-> Use SQL Server authentication (SA, null password)-> determine-> application->
D: Initializing Subscriptions
Replication Monitor-> Publisher (ZEHUADB)-> Double-click Subscription-> Force new-> next-> Select Enabled Subscribers->zlp->
Next-> next-> next-> next-> complete