问题从SQL Server 2012导出到PostgreSQL

时间:2014-02-26 17:46:12

标签: sql sql-server database postgresql sql-server-2012

我正在尝试将SQL Server 2012数据库导出到PostgreSQL 9.3中,但是浮点列出现了奇怪的转换错误。如果导入忽略浮动列,一切顺利(大约300k行),否则我得到以下内容:

- Copy in "TABLE_TO_COPY" (Error)

Messagges
Error 0xc020844b: Data Flow Task 1: Exception during data insertion. The message returned by the provider is: Unable to cast object of type 'System.Double' to type 'System.Char[]'.
 (SQL Server Import and Export Wizard)

Errore 0xc0047022: Data Flow Task 1: Error Code SSIS DTS_E_PROCESSINPUTFAILED. Error in method ProcessInput in component "Destination - TABLE_TO_COPY" (94) with code 0xC020844B during the processing of the input "Destination Input" (97). The specified component returned an error from the method ProcessInput.  [...]

Error 0xc02020c4: Data Flow Task 1: Attempt to add a row to the buffer of activity Data flow errored with code 0xC0047020. [...]
 (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: Error Code SSIS DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Origin - PATIENT_DIALYSIS_SYMPTOM returned error code 0xC02020C4. 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)

这不是内存问题,因为服务器设置具有最高可能值。什么可能导致这种情况?

1 个答案:

答案 0 :(得分:0)

此问题仅出现在SQL Server Management Studio的“导入/导出向导”中。通过诉诸SSIS,问题就不存在了。

这是我为数据流任务设置的配置:

  • 源:OLE DB指向我的SQL Server数据库表
  • 目的地:指向我的PostgreSQL表的OCDB连接

看起来SSIS不能在原始数据库中创建源表,所以我必须在设置项目之前这样做。