sql2005-SqlServer2005 Detailed graphics configuration database synchronization

This tag: sql2005

1 software ready condition

A machine end: SqlServer2005 Management Studio + WinServer 2003 Enterprise (as the publisher)

Machine B-side: Sqlserver2005 Management Studio Express + WinXP (as a subscriber)

(Can use other, but not higher than the subscription server version Publisher version)

2 database replication ready condition

1. All the data table is synchronized as much as possible to use the primary key, if no primary key does not matter, SqlServer prompts automatically generated primary key for the table, FIG.

 

 

 

2. Publishers, Distributors, and Subscribers must use a computer to register the name SQLSERVER server.

3. SQLSERVER necessary to start the agent service, and agent service must run as the local computer account. Not use IP addresses and aliases to register, such as LOCAL, ".", And so on LOCALHOST.

 

 

 

If another network segment or a remote server, or only with IP, can not use the computer name, the registration server alias for each other. The corresponding relationship between the local system is added to the network configuration files. The specific location of the file in the C: \ Windows \ system32 \ drivers \ etc \ hosts

Configuration: use Notepad to open the hosts file, add the corresponding relationship between the IP address and host name at the bottom of the file. Figure:

 

 

 

4.SqlServer necessary to start the agent service, and agent services necessary to run in the local computer account.

5. Publisher and Subscriber must be set up MSDTC, allow network access management tool in Control Panel --- --- --- computer --- Component Services My Computer (Win7 keep looking - Distributed Transaction Coordinator --- local DTC), right property, find the MSDTC tab, click security settings, you can set as follows

)

 

 

 

OK, restart the MSDTC service.

II: preparation of detailed procedures

1, on the publisher, create a shared directory, as the release of the directory where the snapshot file, add Full Control permissions to EveryOne shared directory.

2, to determine the release of the database on the server used to publish and subscribe server for subscription database structure to be consistent, or subscribe to create a new empty database server (not create a table).

3, will be released end database owner and subscribing side are set to sa.

4, start the SQL Agent (SQLSERVERAGENT) service.

5, open SQL Server 2005, network protocol TCP / IP and named pipes protocol and restart the network services.

 

 

 

6, set the SQL SERVER is a mixed identity SQL Server and WINDOWS (release, subscribers are set)

7, the publisher and subscriber registration with each other

Proceed as follows: View --- à-click a registered server --- à right-click the database engine --- à New Server Registration ---- à fill out to register a remote server name ---- à identity election "SQL Server "---- à username (sa) password, for only with IP, can not use the computer name, its registration server alias, see above.

Preparatory work is completed, then we publish and subscribe operations

Second, publish and subscribe []

A: Published

(1) First, we open SqlServer2005 Management Studio (Enterprise Edition) at the Publisher (winserver2003). Copy nodes found in the "Explorer", right --- New Publication (Note: If you are SqlServer express version, this feature is not yet released, only subscriptions!)

 

 

 

(2) Next, choose to publish the database, the next step, select "Publish Type", choose me "merge publication"

 

 

 

(3) Next, select the subscription server type, select "SqlServer2005", the next step, select Publish project, we select tables, views, stored procedures, and so on.

 

 

 

(4) If your table has no primary key, SqlServer will prompt you to automatically add a primary key for the table with no primary key.

 

 

 

(5) Next, set work plan, in order to facilitate see the test results, we set up "every minute" to perform a job.

 

 

 

(6) Snapshot Agent security settings, connect to the Publisher, you can use the simulation process.

 

 

 

(7) to publish a name, complete release

 

 

 

II: Subscribe

Next, we configure the subscription server. Subscribers are winxp system, SqlServer version SqlServer 2005 Manager Studio Express, only supports subscription.

(1) with the release of the New Subscription

 

 

 

(2) Select the publisher, we just find the new release "Test3", the next step

 

 

 

(3) choose to run the agent position, based on demand option is to "push" or "request"!

 

 

 

(4) with the next release is similar, not go into here, the successful implementation of subscription, the subscription database and database publishing table will be one more field, SqlServer automatically generated! Sign the subscription is successful.

Third,] [View sync status

View synchronization status can only be viewed on the publisher. :( specific steps following the release of the figures mentioned above is not the same with a release)

(1) Open the "copy" - the right name - "Enabling Replication Monitor"

 

 

 

(2) Expand the "My Publishers" - publishing server machine name --- name. On the right side you will see the subscriber "syncing." Right, select "Properties" to open the detailed description.

 

 

 

(3) open the Properties dialog box will pop up sync history. Here insert, update, and delete records operations.

 

 

 

Of course, there are many details in this article may not say so clearly, it is inevitable there will be some problems, I will write in subsequent next blog about the problems encountered and solutions. You have any questions, please communicate with each other

to sum up

These are the entire contents collected for you, I hope to find a program article can help you solve development program encountered confusion.

If you think the site is not bad, the trouble will recommend it to friends.

Guess you like

Origin www.cnblogs.com/SyncNavigator8-4-1/p/10974394.html