The EnumSnapshotAgentView method returns a QueryResults object enumerating execution status information for an agent used to create snapshots of replicated data.
DistributionPublication Object
object.EnumSnapshotAgentView() as QueryResults
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
A QueryResults object containing one result set defined by these columns.
Column | Data type | Description |
---|---|---|
dbname | nvarchar(129) | Name of the database used for distribution. |
name | nvarchar(101) | Name of the Distribution Agent. |
status | integer | Agent status. Interpret by using SQLDMO_TASKSTATUS_TYPE. |
publisher | nvarchar(129) | Publisher name. |
publisher_db | nvarchar(129) | Name of database published. |
publication | nvarchar(129) | Publication name. |
start_time | nvarchar(25) | Date and time at which agent started. |
time | nvarchar(25) | Current date and time at the Distributor. |
duration | integer | Cumulative run time. |
comments | nvarchar(256) | Descriptive text. |
delivered_transactions | integer | Cumulative number of transactions. |
delivered_commands | integer | Cumulative number of commands. |
delivery_rate | float | Average number of transactions delivered per second. |
error_id | integer | When nonzero, the Microsoft® SQL Server™ error message number of the most recent error. |
job_id | binary(22) | Identifier of the SQL Server Agent job starting the replication agent. |
local_job | bit | Reserved. |
profile_id | integer | Profile identifier. |
agent_id | integer | Agent identifier. |
local_timestamp | binary(14) | Timestamp. |
In the result set, date and time data returned in start_time and time is formatted as YYYYMMDD hh:mm:ss.fff where: YYYY represents the year in four digits; MM represents the month in two digits (zero padded); DD represents the day of the month in two digits; hh represents the hour using two digits, a twenty-four hour clock and zero padding; mm represents the minute in two digits (zero padded); ss represents the second in two digits (zero padded); and fff represents the fractional part of the second in three digits.
HRESULT EnumSnapshotAgentView(
LPSQLDMOQUERYRESULTS* ppResults);