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.

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"