2010-12-07 74 views
2

是否可以重用共享查找緩存?緩存轉換重用

我已經使用緩存轉換組件到一個foreach循環來通過參數化查詢來初始化查找。

必須爲循環的每次迭代重寫高速緩存。

但在第二次迭代我收到的錯誤:

Error: 0xC0010200 at fill lookup cache, Cache Lookup Events [1]: The component "Cache Lookup Events" (1) cannot write to the cache because component "Cache Lookup Events" (1) has already written to it. 
Error: 0xC0010201 at fill lookup cache, Cache Lookup Events [1]: Failed to prepare the cache for new data. 
Error: 0xC004701A at fill lookup cache, SSIS.Pipeline: component "Cache Lookup Events" (1) failed the pre-execute phase and returned error code 0xC0010201. 

一個想法是,以限制緩存生命的循環範圍。就像變量一樣。但我不知道如何將作用域分配給緩存。

如何清理並重寫緩存或刪除並重新創建緩存?

回答

2

試圖找到一個答案,這個自己,但顯然所有的連接通過打開了包運行的整個時間..

您可能能夠通過創建一個填充一個子包來解決這個問題文件緩存作爲子包不共享連接管理器..

0

我對緩存的閱讀暗示在一個包執行,一個特定的緩存只能加載一次。請參閱本文「SSIS cache transform – Failed to Prepare the Cache For New Data」。

可能有解決方案您的問題,你可以從this blog拉出。但它將使用文件系統任務來重命名緩存。

另一個選擇是腳本緩存連接管理器並動態創建它,如在此blog中一樣。