Service.ServiceState 属性

定义

获取SQL Server服务的状态,例如正在运行、已停止或已暂停。

public:
 property Microsoft::SqlServer::Management::Smo::Wmi::ServiceState ServiceState { Microsoft::SqlServer::Management::Smo::Wmi::ServiceState get(); };
public Microsoft.SqlServer.Management.Smo.Wmi.ServiceState ServiceState { get; }
member this.ServiceState : Microsoft.SqlServer.Management.Smo.Wmi.ServiceState
Public ReadOnly Property ServiceState As ServiceState

属性值

Microsoft.SqlServer.Management.Smo.Wmi.ServiceState

一个 Microsoft.SqlServer.Management.Smo.Wmi.ServiceState 对象值,该值指定SQL Server服务的状态。

示例

使用 WMI 提供程序管理服务和网络设置

适用于