Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

733


Chapter 28: Replicating Data


28


The task to use the wizard to confi gure it across the environments could be just as painful
as running the scripts. Fortunately, during the wizard confi guration process, you have the
option to generate a script of all user actions. This script can come in handy during various
stages of deployment and in some disaster recovery scenarios.

Before confi guring replication, you must understand the limitations of various SQL Server
editions. For example, SQL Server Express can act only as a subscriber, and the number of
subscribers each edition can have is limited. Merge replication can be used to replicate only
to subscribers with the same version or lower. For example, you can’t have a SQL Server
2008 R2 publisher merge replicating to SQL Server 2012 subscribers; however, a SQL Server
2012 publisher can replicate to a SQL Server 2008 R2 subscriber. Merge replication is the
only replication type that can replicate to SQL Server CE subscribers.

Creating a Publisher and Distributor
To enable a server as a publisher you must fi rst confi gure it as a subscriber. Although you
can confi gure the publisher with a local or remote distributor, it is recommended that you
confi gure the distributor fi rst before creating your fi rst publication. This way, if a problem
exists, it will be easier to troubleshoot.

The following steps walk you through the process to create your fi rst distributor:


  1. Connect to the server that will act as your publisher/distributor or remote distribu-
    tor using SQL Server Management Studio. You need to use the SQL Server 2012 ver-
    sion of SQL Server Management Studio for this.

  2. After you connect, right-click the replication folder, and select the menu option
    Confi gure Distribution.


If you do not see the Confi gure Distribution option, either your SQL Server edition is SQL Server Web or Express, or you
do not have the replication components installed. To install the replication components, you need to run Setup again.


  1. After clicking through the initial splash screen, you have the option to select
    which server you should use as your distributor: either the local server or a remote
    server. If you use a remote server, you need to ensure that the remote server is
    already confi gured as a distributor. Because this is a local distributor, select the
    default option, and click Next.

  2. You are prompted for a folder to serve as the default location where the snapshot
    agent deposits the snapshot. Select a different location if the default folder does
    not have adequate space for your snapshots, or if you want to minimize I/O conten-
    tion. The snapshot generation process is an I/O-intensive process during snapshot
    generation. You do have the option to select a snapshot folder or share for each
    publication when you create it, so the snapshot folder location is not of critical


c28.indd 733c28.indd 733 7/31/2012 9:51:11 AM7/31/2012 9:51:11 AM


http://www.it-ebooks.info
Free download pdf