Dropping Elements in a Logical Primary Replication Path

Use the drop and logical parameters with sp_replication_path to remove elements from a logical replication path.

In this example, the logical_1 logical path contains the pdb_1 and pdb_2 physical paths, which are called elements of logical_1. You can remove an element from the logical path.
Warning!   If you remove a path from, or add a path to an existing logical path, the set of destinations can change and replicated objects may not get to the destinations that the replicated objects did go to before the change.
  1. Remove pdb_1 from logical_1:
    sp_replication_path 'pdb', 'drop', 'logical', 'logical_1', 'pdb_1'
    The logical_1 logical path now contains only the pdb_2 physical path. Any objects bound to logical_1 replicate only through pdb_2.
  2. Remove pdb_2 from logical_1:
    sp_replication_path 'pdb', 'drop', 'logical', 'logical_1', 'pdb_2'
    If you remove the last element, and if there are no objects bound to the logical path, Replication Server removes the last element and the entire logical path together because a logical path cannot exist without its elements.