Display Replication Path Information

Use the list parameter with sp_replication_path at the primary database to display information on bindings and replication objects.

sp_replication_path dbname, 'list', ['object_type'], ['object_name']
  • object_type – specify the type of object: path, table , sproc (stored procedure).
  • object_name – display the binding relationships for a particular object. You must specify object_type when you want to specify the name of an object.

Example 1

To display the path relationships of all bound objects, do not specify object_type or object_name:
sp_replication_path 'pdb','list'
go
You see:
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)

Example 2

To display information on all bound tables:
sp_replication_path 'pdb','list','table'
go
You see:
Binding              Type     Path
-------------------- -------- --------------------
dbo.dt1              T        everywhere
dbo.t1               T        pdb_2
dbo.t2               T        pdb_1

(3 rows affected)
(return status = 0)

Example 3

To display information on all stored procedures:
sp_replication_path 'pdb','list','sproc'
go
You see:
Binding              Type     Path
-------------------- -------- --------------------
dbo.sproc1           P        pdb_2
dbo.sproc1           P        pdb_1
dbo.sproc2           P        pdb_1

(3 rows affected)
(return status = 0)

Example 4

To display information on only the sproc1 stored procedure:
sp_replication_path 'pdb','list','sproc','sproc1'
go
You see:
Binding              Type     Path
-------------------- -------- --------------------
dbo.sproc1           P        pdb_2
dbo.sproc1           P        pdb_1

(2 rows affected)
(return status = 0)

Example 5

To display information on all replication paths:
sp_replication_path 'pdb','list','path'
go
You see:
Path                 Type     Binding
-------------------- -------- ----------------------
everywhere           T        dbo.dt1
pdb_1                P        dbo.sproc1
pdb_1                T        dbo.t2
pdb_2                P        dbo.sproc1
pdb_2                T        dbo.t1

(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)

Example 6

To display information only on the "everywhere" logical replication path:
sp_replication_path 'pdb','list','path','everywhere'
go
You see:
Path                 Type     Binding
-------------------- -------- -------------------------
everywhere           T        dbo.dt1

(1 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)
Note: You also see the physical paths underlying the logical path.

Example 7

To display information only on the pdb_1 physical path:
sp_replication_path 'pdb','list','path','pdb_1'
go
You see:
Path                 Type     Binding
-------------------- -------- --------------------
pdb_1                P        dbo.sproc1
pdb_1                T        dbo.t2

(2 rows affected)
Physical Path                  Destination
------------------------------ -------------------
pdb_1                          RS2

(1 rows affected)
(return status = 0)