0

我将使用导入和导出向导将一个 30 GB 的分隔文本文件导入 SQL Server。分隔字符是 | (管道)我已经在互联网上搜索了所有地方,但还没有解决方案。有一些和我一样的问题,但不是确切的错误信息:

- Executing (Error)
Messages
Error 0xc020209c: Data Flow Task 1: The column data for column "Username" overflowed the disk I/O buffer.
 (SQL Server Import and Export Wizard)

Error 0xc0202091: Data Flow Task 1: An error occurred while skipping data rows.
 (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.
 The PrimeOutput method on component "Source - Sessions_txt" (1) returned error code 0xC0202091.  
The component returned a failure code when the pipeline engine called PrimeOutput(). 
The meaning of the failure code is defined by the component,
 but the error is fatal and the pipeline stopped executing.  
There may be error messages posted before this with more information about the failure.

(SQL Server Import and Export Wizard)

我尝试先将它导入一个excel文件,然后将excel文件导入SQL Server,但行数约为300,000,000条记录!

我相信问题出在 SQL Server 导入和导出向导中的初始导入对话框设置中。我很欣赏你建议的任何解决方案。

谢谢。

4

2 回答 2

1

我个人可能会编写一个控制台应用程序来逐行读取文件并每 X 千行执行一次批量复制。该程序可以记录其进度,以便如果在文件中途发生错误,您可以修复问题并再次继续处理,而无需从头开始。这是一个非常简单的程序,所以你可以很快地把一些东西组合在一起。

于 2015-11-16T08:25:05.737 回答
0

如果您没有点击行分隔符,您可能会收到列 {column} 的列数据溢出磁盘 I/O 缓冲区。例如,如果您的行分隔符设置为 {CR}{LF} 但文件的每一行仅以 {LF} 结尾,那么 SSIS 将尝试将整个文件作为单行读取!

于 2016-04-29T16:51:02.720 回答