Transactional – Adding a new site group

Let’s start with a simple example showing the steps and the forms used to set up replication between sites, as well as the data being replicated. Later examples only show the data being replicated.

In this example, your company has sites OH and MI. The sites are defined on the same intranet, and their databases are on the same SQL server. When OH creates a new site group, you want the new site group to also appear in MI. To do this, you will create a transactional replication rule.

Currently the Site Groups form, which mirrors the site_groups table, at OH contains this group:

The Site Groups form at MI contains this group:

Setting up replication

  1. Make sure the sites are linked.

    In the Sites (or Sites/Entities) form on the OH site, make sure the OH and MI sites are linked. If they are not linked, see the Multi-Site Implementation Guide for information about how to set up linking.

  2. Find the category.

    First, you must determine which replication category contains the table you want to affect. In this case, the site groups are stored in the site_group table.

    In the Replication Categories form, you can see that the Site Admin category contains the site_group table:

    The site_group table is a shared table. When a shared table is replicated, the rows in the table are the same at the source and target sites. (In an _all table there are separate rows for different sites.)

  3. Add a rule.

    In the Replication Rules form on the OH site, create a rule from OH to MI that replicates the Site Admin category:

  4. Regenerate the triggers.

    Then, to reset the table triggers on the OH database, on the Replication Management form, click Regenerate Replication Triggers.

Adding a new site group at OH

Now that your replication rule is set up and triggers are regenerated, you are ready to add the new site group FIN at OH. It has two member records, OH and MI.

Checking the site groups at MI

The new site group record should immediately appear in the MI site, after a form refresh:

Notice that the original OH Site Group record was not replicated. Existing records at the source site are not replicated. Newly added records are replicated. Updated records are not replicated unless they already existed at MI with a primary key that matches the key that exists at OH.