try...catch...finally...bloggg....: Replication in SQLServer

try...catch...finally...bloggg....

Thursday, June 17, 2004

Replication in SQLServer

Replication

Database replication is different from file replication, which essentially copies files. Database-replication products log selected database transactions to a set of internal replication-management tables. The software then periodically checks these tables for updated data and moves the data from the source to the target systems while guaranteeing data coherency and consistency.

Replication improves scalability. The replicated server can be used to support the original server for reporting purposes sharing the load.
Database replication can also supplement your disaster-recovery plans by duplicating the data from a local database server to a remote database server.

Replication is the process whereby data is copied between databases on the same server or different servers connected by LANs, WANs, or the Internet.Microsoft SQL Server replication uses a publisher, distributor and subscriber metaphor.

Replication topologies
Microsoft SQL Server supports the following replication topologies:
Central publisher
Central subscriber
Central publisher with remote distributor
Central distributor
Publishing subscriber

Replication Types
Microsoft SQL Server 7.0/2000 supports the following replication types:
Snapshot
Transactional
Merge

Snapshot replication is the simplest type of replication. With this kind of replication, all replicated data (replica) will be copied from the Publisher database to the Subscriber's/Subscribers' database(s) on a periodic basis. Snapshot replication is best used as a method for replicating data that changes infrequently and when the size of replicated data is not very large.

Transactional replication, SQL Server captures all changes that were made in an article and stores INSERT, UPDATE, and DELETE statements in the distribution database. These changes are then sent to subscribers from the distribution database and applied in the same order. Transactional replication is best used when the replicated data changes frequently or when the size of replicated data is not small and is not necessary to support autonomous changes of the replicated data on the Publisher and on the Subscriber.

Merge replication is the most difficult replication type. It makes possible autonomous changes to replicated data on the Publisher and on the Subscriber. With Merge replication, SQL Server captures all incremental data changes in the source and in the target databases, and reconciles conflicts according to rules you configure or using a custom resolver you create. Merge replication is best used when you want to support autonomous changes of the replicated data on the Publisher and on the Subscriber.

Replication Agents
Microsoft SQL Server 7.0/2000 supports the following replication agents:
Snapshot Agent
Log Reader Agent
Distribution Agent
Merge Agent

SQL Server Replication The above link has information
related to the different SQL server replication topologies, Replication types and replication agents.


·