3

我正在尝试将数据从 Progress 数据库导入 MS SQL 2005 Server 数据库。

在 SQL Server 上,我右键单击我的架构名称并Tasks > Import Data...运行向导。

我有一个 ODBC 连接来进行设置,那里没有问题,我还首先使用 ODBC Explorer 测试我的查询,以确保我没有语法问题。

我正在使用的语句如下:

SELECT "MYTABLE"."FIRST-NAME",
       "MYTABLE"."LAST-NAME",
       "MYTABLE"."D-O-B"
FROM PUB."MYTABLE"

这在 ODBC Explorer 中工作正常,但是当我尝试在 SSIS 中使用它时,我收到以下错误

Executing (Error)
Messages
Error 0xc02090f5: Data Flow Task: The component "Source - Query" (1) was unable to process the data.
 (SQL Server Import and Export Wizard)



Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - Query" (1) returned error code 0xC02090F5.  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)

Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)

Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
 (SQL Server Import and Export Wizard)

Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)

我的第一个想法可能是DateProgress 和 MSSQL 之间的数据类型之间的问题,所以我TO_CHAR在我的语句中尝试过(首先在 ODBC Explorer 中测试)但没有解决它,我已经尝试了所有我能想到的包括

  1. TO_CHAR在 Progress Select 语句中使用
  2. 在 SSIS 中的数据映射期间;尝试使用 Datetime、smalldatetime、nvarchar 等。
  3. 使用TO_CHARNVL
  4. 将所有目标列的大小增加到 200(目前没有列需要超过 50,所以这就足够了)

即使从 select 语句中删除该 Date 字段仍然会产生相同的错误

有什么我错过的吗?SQL Server 是否支持源数据不正确且不受支持?

我在 MSDN 上发现一些帖子建议可能存在数据类型转换问题,并且进度列中的数据溢出也可能存在问题

这似乎是一个间歇性问题,我有其他使用日期的 Progress 数据导入作业并且没有问题(是的,我已经交叉引用了所有设置以确保我没有错过任何东西)

我唯一的选择似乎是从 Progress > Access (或其他一些 DB) > MS SQL 移动数据

4

4 回答 4

3

有疑问时:

Progress --> CSV file --> SSIS --> SQL Server

于 2009-12-11T22:59:57.527 回答
3

Progress DB 将所有数据存储为可变长度。这通常会导致期望数据为固定长度的数据库出现问题。解决方案是运行“dbtool”实用程序。

dbtool 位于 Progress "bin" 目录中。您需要选项 #2“带有修复选项的 SQL 宽度扫描”。

于 2010-01-04T15:45:33.970 回答
1

我很幸运使用 SQL Linked Server 对象通过 Microsoft OLE DB Provider for ODBC Drivers 连接进度数据库。您需要使用 OpenQuery 对象来查询链接服务器,如下所示:

select MyField, MyOtherField from OpenQuery ([MyLinkedServer],'select MyField, MyOtherField from PUB.My_ProgressTable where dtLastUpdated > {d ''2009-01-31''}') 

对于 ODBC DSN,将高级选项卡上的默认隔离级别设置为“未提交读”

这是针对 Linux 服务器上的 Progress 10.1B 数据库使用 SQL 2005。也许不是最优雅或最有效的解决方案,但它非常可靠。

于 2010-10-14T19:05:33.587 回答
0

同样的问题(通过 ODBC 的 INFORMIX 3.81 32 位驱动程序)

原因:SSIS 在空字符串处失败:''。也许它与 NULL 没有什么不同。

解决方案:而不是:

  select col from xxx

放:

  select case when col = '' then NULL else col end col from xxx

为我工作。

于 2010-11-17T13:41:23.310 回答