O'Reilly logo

Microsoft SQL Server 2008 High Availability by Hemantgiri S. Goswami

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuration

We have installed Merge Replication using GUI; let's now learn to install Merge Replication using T-SQL.

Configuring publication using T-SQL

The first step is to create a Distributor. As we have already created a Distributor, we will create publication. We need to execute the following T-SQL to create publication:

-- This will enable database for Replication use [ReportServer$SQL2008R2] execsp_replicationdboption @dbname =N'ReportServer$SQL2008R2', @optname =N'merge publish', @value =N'true' GO /* Please notice that to add publication with Merge replication we have to use sp_addMERGEpublication, unlike snapshot and transaction replication where we are using sp_addpublication */ use [ReportServer$SQL2008R2] execsp_addmergepublication@publication ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required