回溯相容性 (StreamInsight)

 

StreamInsight 2.1

StreamInsight 2.1 需要 SQL Server 2012 授權和 .NET Framework 4.0。 使用 StreamInsight1.2 或 2.0 組件所開發的應用程式或配接器不需要重新編譯,即可搭配 StreamInsight 2.1 執行個體運作。 下列各節將提供設定及移轉現有 StreamInsight 應用程式和 StreamInsight 主機服務以搭配 StreamInsight 2.1 執行個體運作的步驟。

System_CAPS_ICON_note.jpg 注意事項


如需有關此版本中新功能的詳細資訊,請參閱<新功能 (StreamInsight)>。

移轉 StreamInsight 1.2 或 2.0 應用程式

下列程序所提供的步驟可將使用內嵌 StreamInsight 1.2 或 2.0 伺服器的現有應用程式移轉成使用 StreamInsight 2.1 伺服器:

  1. 解除安裝 1.2 或 2.0 StreamInsight 執行個體。

  2. 使用相同的名稱來安裝新的 2.1 執行個體。

    System_CAPS_ICON_warning.jpg 警告


    如果您使用不同的名稱來安裝 2.1 執行個體,而且用於應用程式的執行個體名稱無法設定,您就需要修改應用程式以使用新的執行個體名稱並重新編譯。

  3. 依照組件繫結重新導向中的步驟進行,將 StreamInsight 重新導向組態加入至 app.config。

  4. 將 .NET Framework 4.0 重新導向加入至 app.config。

    <configuration>  
        <startup>  
            <supportedRuntime version="v4.0"/>  
        </startup>  
    </configuration>  
    

移轉 StreamInsight Windows 服務

下列程序所提供的步驟可將使用 1.2 或 2.0 StreamInsight 執行個體的現有 StreamInsight Windows 服務移轉成使用 2.1 執行個體。

  1. 解除安裝 1.2 或 2.0 StreamInsight 執行個體。

  2. 使用相同的名稱來安裝新的 2.1 執行個體。

  3. 將主機專用檔案 (例如使用者定義運算子和配接器的二進位檔、SDF 檔案和 app.config 檔案) 從 1.2 或 2.0 安裝資料夾 (例如:C:\Program Files\Microsoft StreamInsight 1.2\Host) 複製到 2.1 安裝資料夾 (C:\Program Files\Microsoft StreamInsight 2.1\Host)。

  4. 依照組件繫結重新導向中的步驟進行,將 StreamInsight 重新導向組態加入至 app.config。

組件繫結重新導向

如果您有原本繫結至 StreamInsight 1.2 或 2.0 組件的應用程式,您可以設定 app.config 來重新導向繫結,藉此將它重新繫結至 2.1 組件。 下列範例示範 1.2 版本組件的重新繫結,如果您是要重新繫結 2.0 版本組件,請使用 "20.0.0.0" 來全面取代 oldVersion 的值。

  
<configuration>  
    <runtime>  
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            <dependentAssembly>  
                <assemblyIdentity name="Microsoft.ComplexEventProcessing" publicKeyToken="89845dcd8080cc91"/>  
                <bindingRedirect oldVersion="12.0.0.0" newVersion="21.0.0.0"/>  
            </dependentAssembly>  
        </assemblyBinding>  
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            <dependentAssembly>  
                <assemblyIdentity name="Microsoft.ComplexEventProcessing.Adapters" publicKeyToken="89845dcd8080cc91"/>  
                <bindingRedirect oldVersion="12.0.0.0" newVersion="21.0.0.0"/>  
            </dependentAssembly>  
        </assemblyBinding>  
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            <dependentAssembly>  
                <assemblyIdentity name="Microsoft.ComplexEventProcessing.ManagementService" publicKeyToken="89845dcd8080cc91"/>  
                <bindingRedirect oldVersion="12.0.0.0" newVersion="21.0.0.0"/>  
            </dependentAssembly>  
        </assemblyBinding>  
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            <dependentAssembly>  
                <assemblyIdentity name="Microsoft.ComplexEventProcessing.Observable" publicKeyToken="89845dcd8080cc91"/>  
                <bindingRedirect oldVersion="12.0.0.0" newVersion="21.0.0.0"/>  
            </dependentAssembly>  
        </assemblyBinding>  
    </runtime>  
</configuration>  
  
System_CAPS_ICON_warning.jpg 警告


如果沒有在 app.config 中重新導向繫結,可能會導致錯誤發生,而這些錯誤不會直接指出問題。 例如,如果您嘗試在具有 2.1 StreamInsight 執行個體的電腦上啟動參考 1.2 組件的配接器,可能會看見下列錯誤:

Microsoft.ComplexEventProcessing.ConnectionException: There was an error in the runtime: The query 'EqualDownticksUpticksQuery' (query template 'EqualDownticksU pticksQuery_Template') could not be started.-->
'StreamInsight.Samples.Adapters.SimpleTextFileReader.TextFileReaderFactory, StreamInsight.Samples.Adapters.SimpleTextFileReader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not implement an input adapter factory interface.

當您部署使用者定義的運算子時,可能會看見下列錯誤:

Microsoft.ComplexEventProcessing.ConnectionException: The management service encountered an error: The user-defined type 'AfaOperator2' is not derived from any recognized abstract class for user-defined operators`