Configures and manages alternate replication paths between a primary database and Replication Server.
sp_replication_path '<dbname>', { 'add' '<physical_path>', '<repserver_name>', '<rs_username>', '<rs_password>' | 'add', 'logical', '<logical_path>', '<physical_path>' | 'drop', '<physical_path>' | 'drop', 'logical', '<logical_path>', [,'<physical_path>'] | 'bind', '{table | sproc | filter}', '[<table_owner>].<object_name>', '<path_name>' | 'unbind', '{table | sproc | filter | path}', '<object_name>', {'<path_name>' | all} | 'config', '<path_name>', '<config_parameter>', '<config_value>' | 'list'[, 'all | table | sproc | filter' [, '<object_name>']]
The name of the database for which you want to configure RepAgent
Create alternate physical replication paths.
sp_replication_path 'pdb', 'add', 'pdb_1', 'RS2', 'RS2_user', 'RS2_password'
sp_replication_path 'pdb', 'add', 'pdb_2', 'RS1', 'RS1_user', 'RS1_password'
There are now three physical replication paths from pdb: pdb_1, pdb_2, and the existing default path replication path that you must create to either RS1 or RS2 before you create the alternate physical replication paths.
sp_replication_path 'pdb', 'add', 'logical', 'logical_1', 'pdb_1'
sp_replication_path 'pdb, 'add', 'logical', 'logical_1', 'pdb_2'
sp_replication_path 'pdb', 'drop', 'RS1'
Drop physical paths from a logical path.
sp_replication_path 'pdb', 'drop', 'logical', 'logical_1', 'pdb_1'
sp_replication_path 'pdb', 'drop', 'logical', 'logical_1', 'pdb_2'
sp_replication_path 'pdb', 'drop', 'logical', 'logical_1'
Bind objects to a physical or logical replication path.
sp_replication_path 'pdb', 'bind', 'table', 't1', 'pdb_2'
sp_replication_path 'pdb', 'bind', 'table', 'owner1.t2', 'pdb_2'
sp_replication_path 'pdb', 'bind', 'sproc', 'sproc1', 'pdb_2'
sp_replication_path 'pdb', 'bind', 'table', 'dt1', 'everywhere'
sp_replication_path 'pdb', 'bind', 'filter', 'F1', 'pdb_1'
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'
sp_replication_path 'pdb', 'unbind', 'table', 't1', 'pdb_2'
sp_replication_path 'pdb', 'unbind', 'table', 't1', 'all'
sp_replication_path 'pdb', 'unbind', 'path', 'pdb_2', 'all'
Change the password and user ID for alternate replication paths.
To change the:
sp_replication_path 'pdb', 'config', 'pdb_1', 'rs_username', 'RS1_user'
sp_replication_path 'pdb', 'config', 'pdb_1', 'rs password', 'january'
sp_replication_path 'pdb','list' go
Binding Type Path -------------------- -------- -------------------- dbo.dt1 T everywhere dbo.sproc1 P pdb_1 dbo.sproc1 P pdb_2 dbo.t1 T pdb_2 dbo.t2 T pdb_1 (5 rows affected) Logical Path Physical Path ---------------------------- --------------------- everywhere pdb_1 everywhere pdb_2 (2 rows affected) Physical Path Destination ---------------------------- -------------------- pdb_1 RS2 pdb_2 RS1 (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list' go
Binding Type Path -------------------- -------- -------------------- dbo.F1 RF pdb_1 dbo.F2 RF pdb_2 (2 rows affected) Physical Path Destination ----------------------------- -------------------- pdb_1 RS2 pdb_2 RS1 default RS_default (3 rows affected) (return status = 0)
sp_replication_path 'pdb','list', 'all' go
Binding Type Path -------------------- -------- -------------------- dbo.F1 RF pdb_1 dbo.F2 RF pdb_2 (2 rows affected) Inactive Binding Type Path -------------------- -------- -------------------- dbo.dt1 T everywhere dbo.sproc1 P pdb_1 dbo.sproc1 P pdb_2 dbo.t1 T pdb_2 dbo.t2 T pdb_1 (5 rows affected) Physical Path Destination ----------------------------- -------------------- pdb_3 RS2 pdb_4 RS1 (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list','table' go
Binding Type Path -------------------- -------- -------------------- dbo.dt1 T everywhere dbo.t1 T pdb_2 dbo.t2 T pdb_1 (3 rows affected) (return status = 0)
sp_replication_path 'pdb','list','sproc' go
Binding Type Path -------------------- -------- -------------------- dbo.sproc1 P pdb_1 dbo.sproc1 P pdb_2 dbo.sproc2 P pdb_1 (3 rows affected) (return status = 0)
sp_replication_path 'pdb','list','filter' go
Inactive Binding Type Path -------------------- -------- -------------------- dbo.F1 RF pdb_1 dbo.F2 RF pdb_2 (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list','sproc','sproc1' go
Binding Type Path -------------------- -------- -------------------- dbo.sproc1 P pdb_2 dbo.sproc1 P pdb_1 (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list','filter','F1' go
Inactive Binding Type Path -------------------- -------- -------------------- dbo.F1 RF pdb_1 (1 row affected) (return status = 0)
sp_replication_path 'pdb','list','path' go
Path Type Binding Active --------------- ---- ---------- ------------ everywhere T dbo.dt1 No pdb_1 P dbo.sproc1 No pdb_1 RF dbo.F1 Yes pdb_1 T dbo.t2 No pdb_2 P dbo.sproc1 No pdb_2 RF dbo.F2 Yes pdb_2 T dbo.t1 No (7 rows affected) Logical Path Physical Path ----------------------------- ------------------------ everywhere pdb_1 everywhere pdb_2 (2 rows affected) Physical Path Destination ----------------------------- ---------------------- pdb_1 RS2 pdb_2 RS1 (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list','path' go
Path Type Binding Active --------------- ---- ---------- ------------ everywhere T dbo.dt1 No pdb_1 P dbo.sproc1 No pdb_1 RF dbo.F1 No pdb_1 T dbo.t2 No pdb_2 P dbo.sproc1 No pdb_2 RF dbo.F2 No pdb_2 T dbo.t1 No (7 rows affected) Logical Path Physical Path ----------------------------- ------------------------ everywhere pdb_1 everywhere pdb_2 (2 rows affected) Physical Path Destination ----------------------------- ---------------------- pdb_1 RS2 pdb_2 RS1 default RS_Default (2 rows affected) (return status = 0)
sp_replication_path 'pdb','list','path','pdb_1' go
Path Type Binding Active --------------- ---- ---------- ------------ pdb_1 P dbo.sproc1 No pdb_1 RF dbo.F1 Yes pdb_1 T dbo.t2 No (2 rows affected) ' Physical Path Destination ------------------------------ ------------------- pdb_1 RS2 (1 row affected) (return status = 0)
sp_replication_path 'pdb','list','path','logical_1' go
Path Type Binding -------------------- -------- ------------------------- logical_1 T dbo.dt1 (1 rows affected) Logical Path Physical Path ----------------------------- -------------------------- logical_1 pdb_1 logical_1 pdb_2 (2 rows affected) Physical Path Destination ----------------------------- ------------------------- pdb_1 RS2 pdb_2 RS1 (2 rows affected) (return status = 0)
> sp_replication_path primdb, bind, 'table', 'T2', 'PP1' go
Warning: Under the current 'filter' distribution model this binding will be ignored. The table 'T2' is bound to path 'PP1'.