Compartir a través de


InstanceName Propiedad

Gets the instance name of the instance of SQL Server. 

Espacio de nombres:  Microsoft.SqlServer.Management.Smo
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<SfcPropertyAttribute> _
Public ReadOnly Property InstanceName As String
    Get
'Uso
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

Valor de la propiedad

Tipo: System. . :: . .String
A String value that specifies the instance name of the instance of SQL Server.

Notas

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.

Ejemplos

Console.WriteLine(srv.InstanceName)