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 命名空间