Server.PingSqlServerVersion 메서드 (String)

Gets the version number of the instance of SQL Server.

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

구문

‘선언
Public Function PingSqlServerVersion ( _
    serverName As String _
) As ServerVersion
‘사용 방법
Dim instance As Server 
Dim serverName As String 
Dim returnValue As ServerVersion 

returnValue = instance.PingSqlServerVersion(serverName)
public ServerVersion PingSqlServerVersion(
    string serverName
)
public:
ServerVersion^ PingSqlServerVersion(
    String^ serverName
)
member PingSqlServerVersion : 
        serverName:string -> ServerVersion
public function PingSqlServerVersion(
    serverName : String
) : ServerVersion

매개 변수

  • serverName
    유형: System.String
    A String value that specifies the name of the instance of SQL Server.

반환 값

유형: Microsoft.SqlServer.Management.Common.ServerVersion
A ServerVersion object value that specifies the version of the instance of SQL Server.

C#

Server srv = new Server("(local)");
Console.WriteLine(srv.PingSqlServerVersion("(local)"));

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
Write-Host $srv.PingSqlServerVersion("(local)")

참고 항목

참조

Server 클래스

PingSqlServerVersion 오버로드

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

관련 자료

메서드 호출

서버 관리