Transactional – Adding a new site group
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
- 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.
- 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.)
- 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:
- Regenerate the triggers.
Then, to reset the table triggers on the OH database, on the Replication Management form, click .
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.