MSsubscription_agents

Transact-SQL Reference

Transact-SQL Reference

MSsubscription_agents

The MSsubscription_agents table is used by Distribution Agent and triggers of updateable subscriptions to track subscription properties. This table is stored in the subscription database.

Column name Data type Description
id int ID of the row.
publisher sysname Name of the Publisher.
publisher_db sysname Name of the publication database.
publication sysname Name of the publication.
subscription_type int Subscription type:

0 = push
1 = pull
2 = pull anonymous

queue_id sysname ID of the Microsoft Message Queue at the Publisher. queue_id is set to SQL for SQL-based queued updating.
update_mode tinyint Type of updating:

0 = read only
1 = immediate update
2 = queued update using MSMQ queue
3 = immediate update with queued update as failover using MSMQ queue
4 = queued update using SQL Server queue
5 = immediate update with queued update failover, using SQL Server queue

failover_mode bit If a failover type of updating was select, the type of failover chosen:

0 = immediate update is being used. Failover is not enabled.
1 = queued update is being used. Failover is enabled. The queue being used for failover is specified in the update_mode value.

spid int System process ID for the connection used by the Distribution Agent that is currently running or has just run.
login_time datetime Date and time of the Distribution Agent connection that is currently running or has just run.
allow_subscription_copy bit Specifies whether or not the ability to copy the subscription database is allowed.
attach_state int For internal use only.
attach_version binary(16) Unique identifier representing the version of an attached subscription.
last_sync_status int Last run status of the Distribution Agent that is currently running or has just run. Status can be:

1 = Started
2 = Succeeded
3 = In progress
4 = Idle
5 = Retry
6 = Fail

last_sync_summary sysname Last message of the Distribution Agent that is currently running or has just run. Status can be:

Started
Succeeded
In progress
Idle
Retry
Fail

last_sync_time datetime datetime when the last_sync_summary and last_sync_status columns were updated. Pull or anonymous distribution agents running as SqlServer Agent Service jobs will not update these columns. The history information will instead be logged to the job history table in that case.