2017-08-24 248 views
0

爲什麼我不能在循環中使用相同的連接。請問你能幫幫我嗎?我會解釋所有步驟。SSIS錯誤代碼DTS_E_OLEDBERROR。發生了OLE DB錯誤。錯誤代碼:0x80040E14

步驟是如下:

  1. 「獲取按品牌」 塊(執行SQL任務):我查詢品牌數據,輸出 是對象。例如,輸出是「AAA」,「BBB」 - 循環下一步 步驟將運行兩次。
  2. 「Foreach Loop by All Brand」塊:第一輪循環通過。 第二輪循環不是。即使「Gen Header file」 區塊(數據流任務)沒有從第一輪改變 - Connection和 都與第一輪相同。

第二輪循環的是錯誤: Second round of loop is error

的「創頭文件」的詳細塊(數據流任務): The detail of "Gen Header file" block(Data Flow Task)

的「創頭文件」的詳細塊(數據流任務),變量名User :: SQL_P_SCRIPT也不會從第一輪開始更改: The detail of "Gen Header file" block(Data Flow Task)

錯誤消息如下:

Information: 0x4004300A at Gen Header file, DTS.Pipeline: Validation phase is beginning. 
Error: 0xC0202009 at Gen Header file, OLE DB Source revise [12072]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. 
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E37 Description: "ORA-00942: table or view does not exist 
". 
Error: 0xC004706B at Gen Header file, DTS.Pipeline: "component "OLE DB Source revise" (12072)" failed validation and returned validation status "VS_ISBROKEN". 
Error: 0xC004700C at Gen Header file, DTS.Pipeline: One or more component failed validation. 
Error: 0xC0024107 at Gen Header file: There were errors during task validation. 
Warning: 0x80019002 at Foreach Loop by All Brand: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. 
Warning: 0x80019002 at RP_PROD_SpareServer102002211: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. 
SSIS package "RPInStaySurvey.dtsx" finished: Failure. 

回答

0

因爲我在循環中多次使用相同的連接。因此,我將連接名稱「RetainSameConnection」的屬性設置爲True(默認爲False)。問題已經解決了。