InstanceName 属性
Gets the instance name of the instance of SQL Server.
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
<SfcPropertyAttribute> _
Public ReadOnly Property InstanceName As String
Get
用法
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
属性值
类型:System. . :: . .String
A String value that specifies the instance name of the instance of SQL Server.
注释
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.
示例
Console.WriteLine(srv.InstanceName)