for processing. Merge replicationIt allows making 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 on the replicated data on the Publisher and on the Subscriber.Replication agents involved in merge replication are snapshot agent and merge agent.Implement merge replication if, changes are made constantly at the publisher and subscribing servers, and must be merged in the end.By default, the publisher wins all conflicts that it has with subscribers because it has the highest priority. Conflict resolver can be customizedBefore starting the replication process: assume that we have 2 server:EGYPT-AEID: is the publisher server ( contains HRatPublisher ) SPS: is the subscriber server ( contains HRatSubscriber ) use SQL server Authentication mode for login on the publisher database i created table: Employees with fields of (ID, Name, Salary) to replicate its data to the subscriber server.i will use publisher as subscriber alsoNote: Check that SQL Server Agent is running on the publisher and the subscriberSteps:Open SQL Server Management Studio and login with SQL Server Authentication to configure Publishing, Subscribers, and Distribution a- Configure the appropriate server as publisher or distributor. b- Enable the appropriate database for merge replication 2- Create new local publication from DB-Server --> Replication --> Local Publications --> Right Click --> New Pub then choose the database that contains the data or objects you want to replicate then choose the replication type and then specify the SQL server versions that will be used by subscribers to that publication like SQL Server 2005, SQL mobile Edition, SQL for Win CE ....etc after that manage the replication articles, data and db objects, by choosing objects to be replicated Note: you can manage the replication properties for selected objects Then add filters to published tables to optimize performance and then configure the snapshot agent and configure the security for snapshot agent finally rename the publication and click finish3- create a new subscription for the created "MyPublication01" Publication by right click on MyPublication01 --> New Subscriptionthat to configure the "Merge Agent" for replication on the subscriber databasethen choose one or more subscriber databases. you can add new SQL Server subscribersthen specify the Merge Agent security as mentioned above on "Agent Snapshot"and so specify the synchronization schedule for each agent.Schedules:Run Continuously: add schedule times to be auto run continuously Run on demand only: manually run the synchronization and then next up to final step, then click finishyou can check the errors from "Replication Monitor" by right click on Local Replication --> Launch Replication MonitorAdvantages in Replication:Users can avail the following advantages by using replication process:Users working in different geographic locations can work with their local copy of data thus allowing greater autonomy. Database replication can also supplement your disaster-recovery plans by duplicating the data from a local database server to a remote database server. If the primary