Поделиться через


Класс ServerInstance

The ServerInstance class represents an instance of Microsoft SQL Server.

Иерархия наследования

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.Wmi.WmiSmoObject
      Microsoft.SqlServer.Management.Smo.Wmi.ServerInstance

Пространство имен:  Microsoft.SqlServer.Management.Smo.Wmi
Сборка:  Microsoft.SqlServer.SqlWmiManagement (в Microsoft.SqlServer.SqlWmiManagement.dll)

Синтаксис

'Декларация
Public NotInheritable Class ServerInstance _
    Inherits WmiSmoObject
'Применение
Dim instance As ServerInstance
public sealed class ServerInstance : WmiSmoObject
public ref class ServerInstance sealed : public WmiSmoObject
[<SealedAttribute>]
type ServerInstance =  
    class 
        inherit WmiSmoObject 
    end
public final class ServerInstance extends WmiSmoObject

Тип ServerInstance обеспечивает доступ к следующим элементам.

Свойства

  Имя Описание
Открытое свойство Name Gets or sets the name of the referenced Windows Management Instrumentation (WMI) object. (Производный от WmiSmoObject.)
Открытое свойство Parent Gets the ManagedComputer object that is the parent of the ServerInstance object.
Открытое свойство Properties Represents a collection of Property objects. Each Property object represents a property defined on the Windows Management Instrumentation (WMI) object. (Производный от WmiSmoObject.)
Открытое свойство ServerProtocols Represents a collection of ServerProtocol objects. Each ServerProtocol object represents a server protocol defined on the Microsoft Management Instrumentation (WMI) installation.
Открытое свойство State Gets the state of the referenced object. (Производный от SmoObjectBase.)
Открытое свойство Urn Gets the Uniform Resource Name (URN) address that represents the Windows Management Instrumentation (WMI) object. (Производный от WmiSmoObject.)
Открытое свойство UserData Gets or sets user-defined data associated with the referenced object. (Производный от SmoObjectBase.)

В начало

Методы

  Имя Описание
Открытый метод Equals (Производный от Object.)
Открытый метод GetHashCode (Производный от Object.)
Открытый метод GetType (Производный от Object.)
Открытый метод Initialize Initializes the referenced object. (Производный от WmiSmoObject.)
Защищенный метод IsObjectInitialized Specifies whether the referenced object is initialized. (Производный от WmiSmoObject.)
Открытый метод Refresh Refreshes the referenced object and its properties. (Производный от WmiSmoObject.)
Защищенный метод SetName Sets the name of the referenced object. (Производный от WmiSmoObject.)
Защищенный метод SetParentImpl Sets the parent of the referenced object. (Производный от WmiSmoObject.)
Открытый метод ToString (Производный от Object.)
Открытый метод Validate Validates the state of an object. (Производный от SmoObjectBase.)

В начало

Замечания

With the ServerInstance class you can:

  • Manage protocols and network libraries on an instance of SQL Server.

Thread Safety

Все общие статические члены этого типа (Shared в Microsoft Visual Basic) можно использовать в многопоточных операциях. Потокобезопасная работа с членами экземпляров типа не гарантируется.

Примеры

Управление службами и сетевыми настройками с помощью поставщика WMI

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.

См. также

Справочник

Пространство имен Microsoft.SqlServer.Management.Smo.Wmi

Другие ресурсы

WMI and SQL Server

Соединение с компонентом SQL Server Database Engine