Returns information and statistics for subscriptions.
sp_helpsub [info|stats|empty]
sp_helpsub {info|stats|arts|unsub}, sub_name
is a keyword that requests information for all subscriptions or for the specified subscription.
is a keyword that requests statistics information for all subscriptions or for the specified subscription.
is a keyword that requests information about all empty subscriptions (subscriptions with no articles) in all replicate database connections.
is a keyword that requests information about all replicate articles in the specified subscription.
is a keyword that requests information about all primary articles in the corresponding publication for which there are no subscribers in the specified subscription.
is the name of a subscription.
sp_helpsub
Returns information about all subscriptions in all replicate database connections.
Using sp_helpsub with no keyword is functionally identical to specifying only the info keyword.
sp_helpsub info, subdoc
Returns information about the subscription subdoc.
sp_helpsub stats, subdoc
Returns statistics information for the subscription subdoc.
When listing information about subscriptions, the following result set is returned:
Column |
Datatype |
Description |
---|---|---|
ds |
sysname |
Name of the replicate data server |
db |
sysname |
Name of the replicate database |
sub_name |
sysname |
Subscription name |
status |
smallint |
Status of the subscription |
status_desc |
varchar(255) |
Description of the subscription status |
pub_name |
sysname |
Publication name |
When listing statistics information about subscriptions, the following result set is returned:
Column |
Datatype |
Description |
---|---|---|
type |
varchar(3) |
Type of entity: SUB – subscription |
name |
sysname |
Name of the subscription |
tstamp |
datetime |
Timestamp the statistic was generated |
statistic |
varchar(128) |
Name of the statistic |
value |
varchar(255) |
Value of the statistic |
When listing information about replicate articles in subscriptions, the following result set is returned:
Column |
Datatype |
Description |
---|---|---|
ds |
sysname |
Name of the replicate data server. |
db |
sysname |
Name of the replicate database. |
sub_name |
sysname |
Subscription name. |
rart_owner |
sysname |
Owner of replicate article. |
rart_name |
sysname |
Name of replicate article. |
rart_proc_num |
smallint |
Stored procedure group number for replicate article. If only one procedure exists, then proc_num=1. Tables are proc_num=0. |
art_type |
varchar(9) |
Type of replicate article:
|
proxy_table |
sysname |
If replicate article is a table, name of the proxy table. Otherwise, null. |
dist_proc |
sysname |
Name of distribution stored procedure for the replicate article. |
is_validated |
varchar(64) |
Validation flag:
|
where_clause |
varchar(255) or varchar(1837) |
Condition for selecting a subset of data rows to replicate. (Datatype size depends on Adaptive Server version.) |
pub_name |
sysname |
Publication name. |
part_owner |
sysname |
Owner of primary article. |
part_name |
sysname |
Name of primary article. |
part_proc_num |
smallint |
Stored procedure group number for primary article. If only one procedure exists, then proc_num=1. Tables are proc_num=0. |
When listing information about primary articles not subscribed to by the specified subscription, the following result set is returned:
Column |
Datatype |
Description |
---|---|---|
ds |
sysname |
Name of the local primary data server. |
db |
sysname |
Name of the local primary database. |
pub_name |
sysname |
Publication name. |
owner |
sysname |
Owner of primary article. |
part_name |
sysname |
Name of primary article. |
proc_num |
smallint |
Stored procedure group number. If only one procedure exists, then proc_num=1. Tables are proc_num=0. |
art_type |
varchar(9) |
Type of article:
|
numsubscribers |
int |
Number of replicate articles that subscribe to this primary article. |
shadow_table |
sysname |
Name of the shadow table for this primary article. |
When sp_helpsub is invoked with no keyword, it returns information about all subscriptions for all primary database connections.
When you invoke sp_helpsub and specify the info or stats keyword, the subscription name (sub_name) is optional.
When you invoke sp_helpsub and specify the empty keyword, you cannot specify a subscription name (sub_name).
When you invoke sp_helpsub and specify the arts or unsub keyword, the subscription name (sub_name) is required.
When an error occurs, an error message is returned.
sp_helppub, sp_helpreplicateart, sp_helpreplicateconn