Compartilhar via


Propriedade do RDL Service.ServiceState

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

Namespace:  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (em Microsoft.SqlServer.SqlWmiManagement.dll)

Sintaxe

'Declaração
Public ReadOnly Property ServiceState As ServiceState 
    Get
'Uso
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

Valor da propriedade

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

Exemplos

Gerenciando serviços e configurações de rede através do provedor do WMI

Consulte também

Referência

Service Classe

Namespace Microsoft.SqlServer.Management.Smo.Wmi

Outros recursos

WMI and SQL Server

Conectando ao Mecanismo de Banco de Dados do SQL Server