Synchronizing two SQL Servers

Source: Internet
Author: User

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

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.