InstanceName-Eigenschaft
Gets the instance name of the instance of SQL Server.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
<SfcPropertyAttribute> _
Public ReadOnly Property InstanceName As String
Get
'Usage
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
Eigenschaftenwert
Typ: System. . :: . .String
A String value that specifies the instance name of the instance of SQL Server.
Hinweise
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.
Beispiele
Console.WriteLine(srv.InstanceName)
Siehe auch