Server.Name 屬性
Gets the name of the server, which is the physical machine name.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
<SfcKeyAttribute()> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property Name As String
Get
'用途
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
屬性值
型別:System.String
A String value that specifies the name of server.
實作
範例
C#
Console.WriteLine(srv.Name)
PowerShell
Write-Host $srv.Name
請參閱
參考
Microsoft.SqlServer.Management.Smo 命名空間