2016-12-05 73 views
0

我只想將一些文件加載​​到Azure數據庫中。 我正在使用「Microsoft SQL Server」數據庫類型進行連接。使用MSSQLConnection將文件加載到Azure數據庫中

的問題是,當我插入等超過10000行,我有時(90%的時間)的誤差:

Exception in component tMSSqlOutput_5 
java.sql.BatchUpdateException: I/O Error: Connection reset 
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1091) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tFileInputDelimited_5Process(extractGC_child2.java:28852) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tFileList_6Process(extractGC_child2.java:32386) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tFileList_5Process(extractGC_child2.java:31540) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tMSSqlRow_1Process(extractGC_child2.java:30657) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tLoop_2Process(extractGC_child2.java:30440) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tFileList_4Process(extractGC_child2.java:29664) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tJava_3Process(extractGC_child2.java:34020) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tMSSqlInput_1Process(extractGC_child2.java:33593) 
    at dev_storch.extractgc_child2_0_1.extractGC_child2.tFTPConnection_2Process(extractGC_child2.java:33154) 
[FATAL]: dev_storch.extractgc_child2_0_1.extractGC_child2 - tMSSqlOutput_5 I/O Error: Connection reset 
[FATAL]: dev_storch.extractgc_child2_0_1.extractGC_child2 - tMSSqlRow_7 Invalid state, the Connection object is closed. 

但是,當插入的數據的量是較低的,我不不會收到任何錯誤。

我的配置是這樣的:

tMSSQLConnection。然後我有一些組件從一個文件夾加載文件並將其加載到一個表中。 錯誤發生在tMSSQLOutput。 作業的以下是日誌填充。

enter image description here

我試圖改變批量大小,不使用DBConnection的,但不起作用。

我嘗試了一個通用的JDBC組件,它似乎每次都工作。但我不希望使用通用的JDBC組件,因爲在ouptut組件,我們不能選擇colume DB型(但也許有人知道它是如何可能的):

MSSQL: enter image description here

通用JDBC: enter image description here

預先感謝您...

+0

你在「數據操作」這個字段中做了什麼? –

+0

你有多少個主鍵? –

+0

我沒有任何主鍵。在「數據行動」領域,我把「插入」。 –

回答

0

這裏一個解決方案,也許你的:

  • 請注意批處理大小必須低於或等於JDBC驅動程序授權的參數標記的限制(通常爲2000)除以列數。
+0

我已經嘗試了很多不同的批量大小,即使只有1,但仍然是相同的結果。 –

相關問題