Proprietà Server.Name

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

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
<SfcKeyAttribute()> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property Name As String 
    Get
'Utilizzo
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

Valore proprietà

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

Implementa

IAlienRoot.Name

Esempi

C#

Console.WriteLine(srv.Name)

PowerShell

Write-Host $srv.Name

Vedere anche

Riferimento

Server Classe

Spazio dei nomi Microsoft.SqlServer.Management.Smo

Altre risorse

Impostazione delle proprietà

Impostazione delle proprietà

Gestione dei server