Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

741


Chapter 28: Replicating Data


28


When this is done, follow these steps to set up a peer-to-peer topology:


  1. Return to the publication, right-click the publication again, and this time select
    Confi gure Peer-to-Peer Topology. Click Next at the splash screen.

  2. In the Publication dialog that appears, select your publication database and publi-
    cation. These should be highlighted.

  3. Click Next to launch the Confi gure Topology dialog. Right-click and select Add a
    New Peer Node.

  4. Enter your subscriber name, select the appropriate authentication type, and click
    Next. You are then prompted for a database and Peer Originator ID. Choose 2 for the
    Originator ID; the publisher will have an Originator ID of 1.

  5. Right-click the database icon in the center of the Confi gure Topology dialog, and
    select Connect to All Displayed Nodes. Click Next. This launches the Log Agent
    Security dialog.

  6. Select a security context under which the Log Reader Agent runs, and click Next.
    This launches the Distributor Security dialog.

  7. Select an account under which the Distribution Agent should run and how the
    Distribution Agent should connect to the Subscriber. You need to repeat this for
    each node in the topology. Click Next. This launches the New Peer Initialization
    dialog. You need to restore the publication database on each of the peers or place
    the tables and related replication metadata in place.

  8. Click Next and then Finish to complete the peer-to-peer topology confi guration.


Creating a Merge Publication
Creating merge publications is similar to creating transactional or snapshot publications.
Follow these steps to create a merge publication:


  1. Connect to your publisher in SQL Server Management Studio, expand the
    Replication folder, and right-click the Local Publications folder. Select New
    Publication and click Next.

  2. Select the database you want to merge replicate, and click Next in the Publication
    Database dialog.

  3. For Publication Type, select Merge publication, and click Next.

  4. For Subscriber types, select the type of SQL Server to which you are replicating.
    You can select multiple subscriber types; for example, you can replicate to SQL 2005
    and SQL 2008 publishers.

  5. Click Next to Advance to the Articles dialog. From here, you can choose what you
    want to replicate — for example, tables, views, stored procedures, or functions. If
    you expand a table, you can notice that you have the option to select or deselect


c28.indd 741c28.indd 741 7/31/2012 9:51:13 AM7/31/2012 9:51:13 AM


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