GetAgentsStatus2 Method (DistributionPublication2, DistributionPublisher2)
この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。
The GetAgentsStatus2 method returns a high level report of execution state for replication agents implementing the publications of a Publisher.
構文
object.GetAgentsStatus2( fExcludeAnonymous,pRetValStatus,pRetValTimeStamp)
Parts
object
Expression that evaluates to an object in the Applies To list.fExcludeAnonymous
Boolean that specifies whether status from anonymous subscriptions is excluded.pRetVal
Enumerated long value returned.pRetValTimeStamp
String value returned.
Prototype (C/C++)
HRESULT GetAgentsStatus2(
BOOL fExcludeAnonymous,
SQLDMO_TASKSTATUS_TYPE *pRetVal,
SQLDMO_LPBSTR pRetValTimeStamp);
Returns
Interpret the value returned in the ReturnedStatus argument using these SQLDMO_TASKSTATUS_TYPE values.
Constant |
Value |
Description |
---|---|---|
SQLDMOTask_Failed |
6 |
At least one agent-implementing job has failed to execute successfully. |
SQLDMOTask_Idle |
4 |
All agent-implementing jobs are scheduled and idle. |
SQLDMOTask_Pending |
0 |
All agent-implementing jobs are waiting to start. |
SQLDMOTask_Retry |
5 |
At least one agent-implementing job is attempting to execute after a previous failure. |
SQLDMOTask_Running |
3 |
At least one agent-implementing job is executing. |
SQLDMOTask_Starting |
1 |
One or more agent-implementing jobs are starting. |
SQLDMOTask_Succeeded |
2 |
All agent-implementing jobs have successfully executed. |
The TimeStamp argument returns a timestamp (binary) value as a hexadecimal character string.
説明
The GetAgentsStatus2 method extends the functionality of the GetAgentsStatus method by including the fExcludeAnonymous parameter. When fExcludeAnonymous is set to TRUE, anonymous subscriptions are not enumerated.
When using Microsoft Visual Basic as a SQL Distributed Management Objects (SQL-DMO) application development environment, use the subroutine call statement syntax to execute the GetAgentsStatus method successfully.
注 |
---|
SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference using SysFreeString. |
注 |
---|
If an application calls GetAgentsStatus2 on 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. |