Proprietà Service.ServiceState

Gets the state of the SQL Server service, such as running, stopped, or paused.

Spazio dei nomi  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (in Microsoft.SqlServer.SqlWmiManagement.dll)

Sintassi

'Dichiarazione
Public ReadOnly Property ServiceState As ServiceState 
    Get
'Utilizzo
Dim instance As Service 
Dim value As ServiceState 

value = instance.ServiceState
public ServiceState ServiceState { get; }
public:
property ServiceState ServiceState {
    ServiceState get ();
}
member ServiceState : ServiceState
function get ServiceState () : ServiceState

Valore proprietà

Tipo: ServiceState
A ServiceState object value that specifies the state of the SQL Server service.

Esempi

Gestione di servizi e di impostazioni di rete tramite il provider WMI

Vedere anche

Riferimento

Service Classe

Spazio dei nomi Microsoft.SqlServer.Management.Smo.Wmi

Altre risorse

WMI and SQL Server

Connessione al Motore di database di SQL Server