1, Copy introduction
Simply put, replication is the process of acquiring one or more databases, which provides a rule-based copy mechanism for accessing data from different databases.
Replication is divided into three different roles,
1, publishing Server
The publisher can be viewed as a source database.
2, distribution server
The distribution database takes on some of the work of a clearing house for changes, and he is a special distribution database that tracks changes and also tracks which subscribers have received these changes. In addition, it tracks the results of any synchronization process and knows what conflicts are occurring that must be resolved.
3, subscriber
Any database that participates in the replication publishing process, the Subscriber is not only accepting data, it can also propagate data. Subscribers can either request subscriptions or push subscriptions.
Pull subscriptions: The Subscriber decides when to update the data.
Push subscriptions: The publication database determines when data is updated to the subscription service.
2,sqlserver2005 and SQLServer2008 database synchronization
The operation steps are as follows:
Configuring the SQLSERVER2005 Publishing Database
1, log in with Windows account, make sure SQL Server Agent is open, new database [Testfabu]
2, under the Copy node, create a new publication. Next select database [Testfabu]
3, select Snapshot Publishing, Next, select the table structure that needs to be synchronized, and stored procedures, and so on.
Set up the SA account here, as long as you have permission to operate the database account.
When finished, right-click Properties on this publication
We choose FTP, should be for me these two databases are not on the same computer.
Set default location
Ensure that the default location FTP accessible, and have Read permission to locate FTP to the root directory.
Publish Server Configuration Complete
Configuring Subscribers
Also log on as a Windows account.
This is not allowed through IP access, in the host file to do a mapping, and then access through the name.
Here we use the request subscription mentioned above.
The SA database for the linked publisher.
Here you can request subscriptions as scheduled.
The subscription was successful.
Colleagues to view properties in FTP access.
3. Summary
This allows us to achieve SQLServer2005 and SQLServer2008 database synchronization, where it is best to synchronize data in real time with transactional replication, snapshot replication for the synchronization of the interval.