ServerConnection.TrueName 속성

Gets the name of the server.

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)

구문

‘선언
Public Property TrueName As String 
    Get 
    Set
‘사용 방법
Dim instance As ServerConnection 
Dim value As String 

value = instance.TrueName

instance.TrueName = value
public string TrueName { get; set; }
public:
property String^ TrueName {
    String^ get ();
    void set (String^ value);
}
member TrueName : string with get, set
function get TrueName () : String 
function set TrueName (value : String)

속성 값

유형: System.String
A String value that specifies the name of the server.

주의

The name of the server is the equivalent to the value returned by the @@SERVERNAME Transact-SQL function.

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.TrueName);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.TrueName

참고 항목

참조

ServerConnection 클래스

Microsoft.SqlServer.Management.Common 네임스페이스