SQL-DMO
Status Property (TargetServer)
The Status property returns component execution or integrity state information.
Applies To
TargetServer Object |
Syntax
object.Status
Parts
object
Expression that evaluates to an object in the Applies To list
Data Type
Long
Modifiable
Read-only
Prototype (C/C++)
HRESULT GetStatus(LPLONG pRetVal);
Returns
The Status property is returned as a bit-packed long. One or more of the following values can be returned.
Constant | Value | Description |
---|---|---|
SQLDMOTargetServerStatus_Blocked | 4 | An instance of Microsoft® SQL Server™ 2000 is visible. SQL Server Agent is blocked. |
SQLDMOTargetServerStatus_Normal | 1 | An instance of SQL Server is visible. SQL Server Agent is known to be running. |
SQLDMOTargetServerStatus_SuspectedOffline | 2 | An Instance of SQL Server is visible. SQL Server Agent execution state cannot be determined. |
SQLDMOTargetServerStatus_Unknown | 0 | Network error prevents determination of referenced server and SQL Server Agent state. |