Partager via


Propriété Service.ServiceState

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

Espace de noms :  Microsoft.SqlServer.Management.Smo.Wmi
Assembly :  Microsoft.SqlServer.SqlWmiManagement (en Microsoft.SqlServer.SqlWmiManagement.dll)

Syntaxe

'Déclaration
Public ReadOnly Property ServiceState As ServiceState 
    Get
'Utilisation
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

Valeur de propriété

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

Exemples

Gestion des services et des paramètres réseau à l'aide du fournisseur WMI

Voir aussi

Référence

Service Classe

Espace de noms Microsoft.SqlServer.Management.Smo.Wmi

Autres ressources

WMI and SQL Server

Connexion au moteur de base de données SQL Server