MSsubscription_agents (Transact-SQL)

Applies to: SQL Server

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 The ID of the row.
publisher sysname The name of the Publisher.
publisher_db sysname The name of the publication database.
publication sysname The name of the publication.
subscription_type int The subscription type:

0 = Push.

1 = Pull

2 = Pull anonymous.
queue_id sysname The ID of the Microsoft Message Queue at the Publisher. queue_id is set to SQL for SQL-based queued updating.
update_mode tinyint The type of updating:

0 = Read-only.

1 = Immediate update.

2 = Queued update using Message Queuing.

3 = Immediate update with queued update as failover using Message Queuing.

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, this is 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 The system process ID for the connection used by the Distribution Agent that is currently running or has just run.
login_time datetime The 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 Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
attach_version binary(16) The unique identifier representing the version of an attached subscription.
last_sync_status int The last run status of the Distribution Agent that is currently running or has just run. The status can be:

1 = Started.

2 = Succeeded.

3 = In progress.

4 = Idle.

5 = Retry.

6 = Fail.
last_sync_summary sysname The last message of the Distribution Agent that is currently running or has just run. The status can be:

Started.

Succeeded.

In progress.

Idle.

Retry.

Fail.
last_sync_time datetime The date and time when the last_sync_summary and last_sync_status columns were updated. Pull or anonymous distribution agents running as SqlServer Agent Service jobs do not update these columns. The history information instead logs to the job history table in that case.
queue_server sysname Internal use only.

See Also

Replication Tables (Transact-SQL)
Replication Views (Transact-SQL)
sp_helppullsubscription (Transact-SQL)