EnumSubscriptionViews2 Method
Esse recurso será removido em uma versão futura do Microsoft SQL Server. Evite usar esse recurso em desenvolvimentos novos e planeje modificar os aplicativos que atualmente o utilizam.
The EnumSubscriptionViews method returns a QueryResults object that enumerates subscription execution status information maintained at a Distributor.
Sintaxe
object
.EnumSubscriptionViews2( [ fExcludeAnonymous ] )as QueryResults
Parts
object
Expression that evaluates to an object in the Applies To list.fExcludeAnonymous
Boolean that specifies whether anonymous subscriptions views are enumerated. Default is FALSE.
Prototype (C/C++)
HRESULT EnumSubscriptionViews2(
LPSQLDMOQUERYRESULTS *ppResults,
BOOL fExcludeAnonymous) PURE;
Returns
When the DistributionPublication object references a merge replication publication, the QueryResults object that contains one result set is defined by these columns.
Column |
Data type |
Description |
---|---|---|
action_time |
nvarchar(25) |
Date and time of execution for most recent subscription action. |
agent_id |
integer |
Agent identifier. |
agent_name |
nvarchar(101) |
Name of the replication agent. |
delivery_rate |
integer |
Average number of rows delivered per second. |
duration |
integer |
Elapsed time of the logged session activity in seconds. |
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. |
last_action |
nvarchar(256) |
Descriptive text. |
local_job |
bit |
When TRUE, the SQL Server Agent job executes at the Distributor. When FALSE, the SQL Server Agent job executes at the Subscriber. |
local_timestamp |
binary(14) |
Timestamp. |
profile_id |
integer |
Profile identifier. |
publisher_conflicts |
integer |
Number of deletes at the Publisher. |
publisher_/deletecount |
integer |
Number of deletes at the Publisher. |
publisher_/insertcount |
integer |
Number of inserts at the Publisher. |
publisher_/updatecount |
integer |
Number of updates at the Publisher. |
start_time |
nvarchar(25) |
Date and time at which agent session started. |
status |
integer |
Agent status. Interpret using SQLDMO_TASKSTATUS_TYPE. |
subscriber |
nvarchar(129) |
Name of subscribing data source. |
subscriber_/updatecount |
integer |
Number of updates at the Subscriber. |
subscriber_conficts |
integer |
Number of conflicts at the Subscriber. |
subscriber_db |
nvarchar(129) |
Name of the subscribed database at the Subscriber. |
subscriber_/deletecount |
integer |
Number of deletes at the Subscriber. |
subscriber_/insertcount |
integer |
Number of inserts at the Subscriber. |
type |
integer |
Direction of subscription (push or pull) interpreted using SQLDMO_SUBSCRIPTION_TYPE. |
When the DistributionPublication object references a transactional or snapshot replication publication, the QueryResults object that contains one result set is defined by these columns.
Column |
Data type |
Description |
---|---|---|
action_time |
nvarchar(25) |
Date and time of execution for most recent subscription action. |
agent_id |
integer |
Agent identifier. |
average_commands |
integer |
Average number of commands per transaction. |
delivered_/commands |
integer |
Cumulative number of commands. |
delivered_/transactions |
integer |
Cumulative number of transactions. |
delivery_latency |
integer |
Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber. |
delivery_rate |
integer |
Average number of commands delivered per second. |
delivery_time |
integer |
Cumulative time spent delivering transactions. |
distribution_agent |
nvarchar(101) |
Name of the replication agent. |
duration |
integer |
Elapsed time of the logged session activity. |
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. |
last_action |
nvarchar(256) |
Descriptive text. |
last_timestamp |
binary(14) |
Timestamp. |
local_job |
bit |
When TRUE, the SQL Server Agent job executes at the Distributor. When FALSE, the SQL Server Agent job executes at the Subscriber. |
profile_id |
integer |
Profile identifier. |
start_time |
nvarchar(25) |
Date and time at which agent session started. |
status |
integer |
Agent status. Interpret using SQLDMO_TASKSTATUS_TYPE. |
subscriber |
nvarchar(129) |
Name of subscribing data source. |
subscriber_db |
nvarchar(129) |
Name of the subscribed database at the Subscriber. |
type |
tinyint |
Subscription direction. Interpret the value using SQLDMO_SUBSCRIPTION_TYPE. |
Comentários
The EnumSubscriptionViews2 method extends the functionality of the EnumSubscriptionViews method by including the optional fExcludeAnonymous parameter. When fExcludeAnonymous is set to TRUE, anonymous Distribution or Merge Agent views are not enumerated.
In the result set, date and time data returned in action_time and start_time is formatted as YYYYMMDD hh:mm:ss.fff.
Date part |
Description |
---|---|
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 (zero padded). |
hh |
Represents the hour using two digits, a twenty-four hour clock (zero padded). |
mm |
Represents the minute in two digits (zero padded). |
ss |
Represents the second in two digits (zero padded). |
fff |
Represents the fractional part of the second in three digits. |
For example, the value 20040512 18:12:00.000 is interpreted as 6:12 P.M., May 12, 2004.
Observação |
---|
If an application calls EnumSubscriptionViews2on an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned. |