Binding Objects to a Replication Path

Use the bind parameter with sp_replication_path to associate an object with a physical or logical primary replication path. The bound object always follows the same path during replication.

You can bind objects, such as tables or stored procedures, to one or more primary replication paths. When you bind an object to a path, RepAgent sends any replicable actions that you perform upon that object through the path to the Replication Servers that you define in your multiple replication path configuration. If you do not bind an object to a path, RepAgent uses the default path to send the object to the Replication Server defined in the default path. You cannot bind an object to the default path and you do not need to do anything to send an object through the default path.

To bind an object to a primary replication path, enter:
sp_replication_path dbname, 'bind', "object_type", "[table_owner].object_name", "path_name"
where:
  • object_typetable or sproc (stored procedure).
  • [table_owner.]object_name – the table or stored procedure name.
    Note: If you do not specify a table owner if the object is a table, the binding applies only to tables owned by dbo, the database owner.
  • path_name – a physical or logical path name.
For example, to bind the:
  • t1 table to the pdb_2 replication path:
    sp_replication_path pdb, 'bind', "table", "t1", "pdb_2"
  • t2 table belonging to owner1 to the pdb_2 replication path:
    sp_replication_path pdb, 'bind', "table", "owner1.t2", "pdb_2"
  • sproc1 stored procedure to the pdb_2 replication path:
    sp_replication_path pdb, 'bind', "sproc", "sproc1", "pdb_2"
  • dt1 dimension table object to the everywhere logical path:
    sp_replication_path pdb, 'bind', "table", "dt1", "everywhere"
Optionally, use the asterisk "*" or percent "%" wildcard characters, or a combination of both in object_name to specify a range of names or matching characters that you want to bind to a path. For example, to bind tables with names that match various wildcard character combinations to the pdb_2 replication path:
  • sp_replication_path pdb, 'bind', 'table', 'a*', "pdb_2"
  • sp_replication_path pdb, 'bind', 'table', 'au%rs', "pdb_2"
  • sp_replication_path pdb, 'bind', 'table', 'a*th%s', "pdb_2"
  • sp_replication_path pdb, 'bind', 'table', 'authors%', "pdb_2"