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 提供程序管理服务和网络设置

适用于