PublicationMonitor.EnumSnapshotAgent Method


为监视的发布使用的快照代理作业返回信息。Returns information for the Snapshot Agent job used by the monitored publication.

 System::Data::DataSet ^ EnumSnapshotAgent();
public System.Data.DataSet EnumSnapshotAgent ();
member this.EnumSnapshotAgent : unit -> System.Data.DataSet
Public Function EnumSnapshotAgent () As DataSet



一个包含以下列的 DataSet 对象。A DataSet object that contains the following columns.

Column 数据类型Data type 说明Description
namename String 复制代理作业名称。Replication Agent job name.
状态status Int32 运行状态:The running status: 1 = 开始1 = Start 2 = 成功2 = Succeed 3 = 正在进行3 = In progress 4 = 空闲4 = Idle 5 = 重试5 = Retry 6 = 失败6 = Fail
publisherpublisher String 发布者名称。Publisher name.
publisher_dbpublisher_db String 已发布的数据库的名称。Name of the database published.
publicationpublication String 发布名称。Publication name.
start_timestart_time String 上次代理执行的日期和时间。Date and time of last agent execution.
timetime String 记录会话的日期和时间。Date and time that the session was logged.
durationduration Int32 会话的持续时间,以秒为单位。Elapsed time of the session, in seconds.
commentscomments String 代理记录的消息文本。Message text logged by the agent.
delivered_transactionsdelivered_transactions Int32 会话中传递的事务总数。Total number of transactions delivered in the session.
delivered_commandsdelivered_commands Int32 会话中传递的命令总数。Total number of commands delivered in the session.
delivery_ratedelivery_rate Single 每秒传递的平均命令数。Average number of commands delivered per second.
error_iderror_id Int32 [MSrepl_errors (transact-sql)](系统表中的错误 ID。The ID of the error in the [MSrepl_errors (Transact-SQL)]( system table. 使用 EnumErrorRecords(Int32) 方法可以返回有关错误的详细信息。Use the EnumErrorRecords(Int32) method to return detailed information about an error.
job_idjob_id Byte**[16]** Byte **[16]** 启动复制代理的 SQL Server 代理作业的标识符。Identifier of the SQL Server Agent job starting the Replication Agent.
local_joblocal_job Boolean 如果为 true,则代理作业在分发服务器上可用。When true, the agent job is available at the Distributor.
profile_idprofile_id Int32 配置文件标识符。Profile identifier.
agent_idagent_id Int32 代理作业标识符。Agent job identifier.
local_timestamplocal_timestamp Byte**[8]** Byte **[8]** 代理最近一次运行的时间戳。Timestamp of the most recent agent run.
dynamic_filter_logindynamic_filter_login String 用于计算定义分区的参数化筛选器中的[SUSER_SNAME (transact-sql)](函数的值。The value used for evaluating the [SUSER_SNAME (Transact-SQL)]( function in parameterized filters that define a partition.
dynamic_filter_hostnamedynamic_filter_hostname String 用于计算定义分区的参数化筛选器中的[HOST_NAME (transact-sql)](函数的值。The value used for evaluating the [HOST_NAME (Transact-SQL)]( function in parameterized filters that define a partition.


EnumSnapshotAgent 方法只能由分发数据库上 db_owner 或 replmonitor 固定数据库角色的成员调用。The EnumSnapshotAgent method can only be called by members of the db_owner or replmonitor fixed database roles on the distribution database.

Applies to

See also