About regenerating replication triggers

The RegenerateReplicationTriggers method includes parameters to pass a server name and database name. If this information is provided, the method uses the server name and database name to build the SQL strings and regenerate the replication triggers at that site and database (that is, remotely).

The logic takes table sharing into account:

  • If a using site on an intranet contains a view to a shared _all or user table, no replication triggers should be generated for that table with the using site as a source site to any other site as a target site.
  • If a site has a replication category for a table that exists in its database, replication triggers for that table should only be created to target sites that are not using sites of that table. That is, there should be no replication triggers from the master site to the using site for shared _all or user tables. Also, there should be no replication triggers from sites in other intranets to using sites for tables that are shared on the using site’s intranet.