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


Свойство InstanceName

Gets the instance name of the instance of SQL Server. 

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

Синтаксис

'Декларация
<SfcPropertyAttribute> _
Public ReadOnly Property InstanceName As String
    Get
'Применение
Dim instance As Server
Dim value As String

value = instance.InstanceName
[SfcPropertyAttribute]
public string InstanceName { get; }
[SfcPropertyAttribute]
public:
property String^ InstanceName {
    String^ get ();
}
[<SfcPropertyAttribute>]
member InstanceName : string
function get InstanceName () : String

Значение свойства

Тип System. . :: . .String
A String value that specifies the instance name of the instance of SQL Server.

Замечания

The InstanceName property specifies the name of the instance of SQL Server. This is usually the computer name but it may be a named instance that was specified during setup.

Примеры

Console.WriteLine(srv.InstanceName)