Compartir a través de


Server.Name Propiedad

Gets the name of the server, which is the physical machine name.

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

Sintaxis

'Declaración
<SfcKeyAttribute()> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property Name As String 
    Get
'Uso
Dim instance As Server 
Dim value As String 

value = instance.Name
[SfcKeyAttribute()]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public string Name { get; }
[SfcKeyAttribute()]
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
virtual property String^ Name {
    String^ get () sealed;
}
[<SfcKeyAttribute()>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
abstract Name : string
[<SfcKeyAttribute()>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
override Name : string
final function get Name () : String

Valor de la propiedad

Tipo: System.String
A String value that specifies the name of server.

Implementa

IAlienRoot.Name

Ejemplos

C#

Console.WriteLine(srv.Name)

PowerShell

Write-Host $srv.Name

Vea también

Referencia

Server Clase

Espacio de nombres Microsoft.SqlServer.Management.Smo

Otros recursos

Establecer propiedades

Establecer propiedades

Administrar servidores