Bagikan melalui


Application.GetServerVersionEx Metode

Definisi

Mengembalikan edisi, tingkat produk, dan nilai lain yang menunjukkan versi SSIS yang diinstal.

public:
 void GetServerVersionEx(System::String ^ server, [Runtime::InteropServices::Out] int % editionID, [Runtime::InteropServices::Out] Microsoft::SqlServer::Dts::Runtime::DTSProductLevel % ssisEditionID, [Runtime::InteropServices::Out] System::String ^ % productVersion, [Runtime::InteropServices::Out] System::String ^ % productLevel);
public void GetServerVersionEx (string server, out int editionID, out Microsoft.SqlServer.Dts.Runtime.DTSProductLevel ssisEditionID, out string productVersion, out string productLevel);
member this.GetServerVersionEx : string * int * DTSProductLevel * string * string -> unit
Public Sub GetServerVersionEx (server As String, ByRef editionID As Integer, ByRef ssisEditionID As DTSProductLevel, ByRef productVersion As String, ByRef productLevel As String)

Parameter

server
String

Nama server untuk mendapatkan informasi versi produk.

editionID
Int32

Parameter keluar yang berisi bilangan bulat yang menunjukkan edisi produk. Pemetaan editionID ke nama edisi ditampilkan di bagian Keterangan.

ssisEditionID
DTSProductLevel

Parameter keluar yang berisi nilai dari DTSProductLevel enumerasi.

productVersion
String

Parameter keluar yang berisi nomor build seperti yang terlihat di Bantuan/Tentang, diformat sebagai major.minor.build.

productLevel
String

Parameter keluar yang menyediakan tingkat paket layanan server SSIS.

Contoh

Contoh berikut menunjukkan nilai yang dikembalikan untuk setiap parameter keluar

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            String serverName = "yourServerName";  
            int ed;  
            DTSProductLevel prodLevel = new DTSProductLevel();  
            String prodVersion;  
            string prodReleaseLevel;     
            Application app = new Application();  
            app.GetServerVersionEx(serverName, out ed, out prodLevel, out prodVersion, out prodReleaseLevel);  

            Console.WriteLine("servernName:     {0}", serverName);  
            Console.WriteLine("Edition:         {0}", ed);  
            Console.WriteLine("prodLevel:       {0}", prodLevel);  
            //Console.WriteLine("prodVersion:     {0}", prodVersion);  
            //Console.WriteLine("prodReleaseLevel {0}", prodReleaseLevel);  
        }  
    }  
}  
Imports System   
Imports System.Collections.Generic   
Imports System.Text   
Imports Microsoft.SqlServer.Dts.Runtime   
Namespace Microsoft.SqlServer.SSIS.Samples   

    Class Program   

        Shared Sub Main(ByVal args As String())   
            Dim servernName As String = "yourServerName"   
            Dim ed As Integer   
            Dim prodLevel As DTSProductLevel = New DTSProductLevel   
            Dim prodVersion As String   
            Dim prodReleaseLevel As String   
            Dim app As Application = New Application   
            app.GetServerVersionEx(servernName, ed, prodLevel, prodVersion, prodReleaseLevel)   

            Console.WriteLine("servernName: {0}", servernName)   
            Console.WriteLine("Edition: {0}", ed)   
            Console.WriteLine("prodLevel: {0}", prodLevel)   
            'Console.WriteLine("prodVersion: {0}", prodVersion)   
            'Console.WriteLine("prodReleaseLevel {0}", prodReleaseLevel)   
            Console.WriteLine   
        End Sub   
    End Class   
End Namespace  

Contoh Output:

serverName: <your server name>

Edition: 4

prodLevel: Enterprise

Keterangan

Tabel berikut mencantumkan nilai untuk ssisEditionID parameter .

EditionID Nama Edisi
0xA485ED98 Standard
0x6B9471A8 Perusahaan
0x81C1F4D2 Pengembang
0x2467BCA1 Evaluasi Perusahaan

Berlaku untuk