다음을 통해 공유


InstanceName 속성

Gets the instance name of the instance of SQL Server. 

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo.dll의 Microsoft.SqlServer.Smo

구문

‘선언
<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)