Setting Up a Master Site and Shared Tables

In a multi-site environment where there are many sites, large amounts of data, and many users, you might want to set up one site as the master site for an intranet. In that case, certain _all tables and user tables can reside only on the master site database and are shared (read and written to through a SQL view) by other sites on the same intranet. No replication needs to occur for the shared _all and user tables, which can greatly improve system performance.

Note:  If you share _all tables or user tables, all sites in the same database must be on the same intranet.

Prerequisite:

Caution:  You must plan your multi-site structure carefully before setting up the shared tables. This requires in-depth understanding of the SQL databases and this application's replication capabilities.

You must also understand your corporate financial reporting requirements.

See the Multi-Site Planning and Replication Reference documents on our support site for more information.

To set up the master site and shared tables:

  1. Prepare all sites on the intranet. These steps assume that you have already used the Configuration Wizard during database server installation to link your multi-site databases.
    1. In the Intranets form, specify all intranets to be used in this multi-site system. If you will be sharing _all tables, define an intranet that will include all the sites that share tables. This cannot be an "External" intranet. All the sites on this intranet must use the same version of this application.

      Do not define the master site yet - that will be done later.

    2. In each site, use the Sites or Sites/Entities form to specify information about this site and the other sites that it relates to. Each site has a record in this form. (This step also applies to entity sites.)
      • On the System Info tab, specify information about the site. Make sure the Intranet Name, Database Name, and Time Zone are set correctly for each of the sites listed on this form.
      • A list of linked sites displays automatically in the Link Info tab. The local site record shows links used in transactional replication between the currently selected site database and other site databases. On site records other than the local site, the Link Info tab should show only links to the local site.
    3. Use the Replication Categories form to specify tables, stored procedures, and XML documents that should be replicated and to group them into categories. The installation process creates some categories. Do not delete these standard categories. These categories have been created and tested to ensure that they handle the standard system processes. They should meet most of your needs without requiring any changes.
    4. On the Replication Rules form, set up transactional rules for the Site Admin replication category between this site and all the other sites in the intranet, including the site that will be the master site. (Site Admin data includes tables such as site, intranet, and IntranetSharedTable.) You might also want to write other rules to replicate certain categories between certain sites. Even if a category contains _all tables that you are sharing, you probably want to write a replication rule for the category. (Any shared _all tables will not be replicated in this case.) Categories may contain additional base tables or stored procedures that are needed to perform certain functions. The rules you need should be determined in the multi-site planning phase.
    5. On the Replication Management form, click Regenerate Replication Triggers. This ensures that site and intranet data is replicated to all the linked sites.
  2. Set up the master site:
    1. Log in to the site that you want to make the master site where the shared tables will exist for the intranet.
    2. On the Intranets form, select this site's intranet. In the Master Site field, select this site to specify it as the master site for the intranet.
  3. Share _All tables, user tables, or both, among the sites in the intranet:
  4. To add a new site to a existing shared tables intranet, see the appendix in the Multi-Site Planning Guide that describes how to add a new site to an existing intranet with shared tables.

If there are other intranets with sites that must replicate (not share) _all or user table data to or from sites in the sharing intranet, replication categories must be set up:

  • For tables that are shared, set up replication categories and rules between the master site and the sites on the other intranets.
  • For tables that are not shared, set up replication categorie and /rules between any or all of the sites in the shared intranet and the sites on the other intranets.

For example:

Intranet 1 has these sites:

  • Site A (master site. Item_mst_all table is shared)
  • Site B

Intranet 2 has these sites:

  • Site C
  • Site D

If Site B needs visibility into Site D's item data, replication rules should be set up from Site D to Site A.

If Site D needs visibility into Site B's item data, replication rules should be set up from Site A to Site D.

If Site C needs visibility into Site B's customer data (not a shared table), replication rules should be set up from Site B to Site C.

Related topics