PublicationMonitor.EnumLogReaderAgent Method


为监视的发布使用的日志读取器代理作业返回信息。Returns information for the Log Reader Agent job used by the monitored publication.

 System::Data::DataSet ^ EnumLogReaderAgent();
public System.Data.DataSet EnumLogReaderAgent ();
member this.EnumLogReaderAgent : unit -> System.Data.DataSet
Public Function EnumLogReaderAgent () 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 monitored publication database.
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.
delivery_timedelivery_time Int32 传递第一个事务的时间。The time first transaction is delivered.
delivered_transactionsdelivered_transactions Int32 会话中传递的事务总数。Total number of transactions delivered in the session.
delivered_commandsdelivered_commands Int32 会话中传递的命令总数。Total number of commands delivered in the session.
average_commandsaverage_commands Int32 会话中传递的每个事务的平均命令数。Average number of commands per transaction delivered in the session.
delivery_ratedelivery_rate Single 每秒传递的平均命令数。Average number of commands delivered per second.
delivery_latencydelivery_latency Int32 在命令被提交到已发布数据库和命令被提交到分发数据库之间的时间,以毫秒为单位。The time, in milliseconds, between a command being committed to the published database and being committed to the distribution database.
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.
last_timestamplast_timestamp Byte**[8]** Byte **[8]** 代理最近一次运行的时间戳。Timestamp of the most recent agent run.


在调用此方法之前,您应提交对对象的任何属性更改, PublicationMonitor 因为如果尚未加载此对象的属性,则可能需要加载此对象的属性。You should commit any property changes to the PublicationMonitor object before calling this method because properties of this object may need to be loaded if they have not been loaded already.

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

Applies to

See also