无法将数据从 Progress DB 导入 SQL Server,数据类型转换出现问题?
我正在尝试将数据从 Progress 数据库导入到 MS SQL 2005 Server 数据库中。
在 SQL Server 上,我右键单击我的架构名称并转到 Tasks >导入数据...
并通过向导运行。
我有一个 ODBC 连接来进行设置,没有任何问题,我还首先使用 ODBC 资源管理器测试我的查询,以确保没有语法问题。
我正在使用的语句如下:
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)
我的第一个想法可能是 Date
数据之间存在问题Progress 和 MSSQL 之间的类型,所以我在我的语句中尝试了 TO_CHAR
(首先在 ODBC Explorer 中测试),但没有解决它,我已经尝试了我能想到的一切,包括
- 使用
TO_CHAR
正在进行中 Select语句 - 在SSIS中的数据映射期间;尝试使用 Datetime、smalldatetime、nvarchar 等等..
- 使用
TO_CHAR
和NVL
- 将所有目标列的大小增加到200(目前没有列需要超过50,所以这已经足够了)
甚至删除该日期select 语句中的字段仍然产生相同的错误
我错过了什么吗?源数据是否有可能不正确且不受 SQL Server 支持?
我在 MSDN 上发现了一些帖子,建议 数据类型转换,进度列中的数据溢出也可能存在问题
这似乎是一个间歇性问题,我还有其他使用日期的进度数据导入作业并且没有任何问题(是的,我已经交叉引用了所有设置以确保我没有错过任何东西)
我唯一的选择似乎是从 Progress > 移动数据访问(或其他一些数据库)>微软SQL
I'm trying to import data from a Progress database into a MS SQL 2005 Server database.
On SQL Server, I'm right clicking on my schema name and going Tasks > Import Data...
and running through the wizard.
I have an ODBC Connection to progress setup, no issues there, I also test my queries using ODBC Explorer first to ensure I have no syntax issues.
A statement that I'm using is as follows:
SELECT "MYTABLE"."FIRST-NAME",
"MYTABLE"."LAST-NAME",
"MYTABLE"."D-O-B"
FROM PUB."MYTABLE"
This works fine in ODBC Explorer, but when I try to use this in SSIS I get the following error
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)
My first thought was maybe an issue between the Date
data types between Progress and MSSQL, so I have tried TO_CHAR
in my statement (tested in ODBC Explorer first) but that didn't resolve it, I've tried everything I can think of including
- Using
TO_CHAR
in the Progress
Select statement - During the data mappings in SSIS; try using Datetime, smalldatetime, nvarchar
etc.. - Using
TO_CHAR
andNVL
- Increasing the size of all destination columns to 200 (no columns need more than 50 at current so this is more than enough)
Even removing that Date field from the select statement still produces the same error
Is there anything I have missed? Is it possible that the source data could be incorrect and not supported in SQL Server?
I have found some posts on MSDN suggestion that there could be an issue with data type conversion and there may also be an issue with the overflow of data in Progress columns
This seems to be an intermittent issue, I have other data import jobs from Progress that use dates and there are no issues (and yes, I have cross-referenced all settings to ensure I haven't missed something)
My only option seems to be to move data from Progress > Access (or some other DB) > MS SQL
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
进度数据库将所有数据存储为可变长度。这通常会导致需要固定长度数据的数据库出现问题。解决方案是运行“dbtool”实用程序。
dbtool 位于 Progress“bin”目录中。您需要选项#2“带修复选项的 SQL 宽度扫描”。
The Progress DB stores all data as variable length. This often causes problems with databases that expect data to be fixed length. The solution is to run the "dbtool" utility.
dbtool is in the Progress "bin" directory. You want option #2 "SQL Width Scan w/Fix Option".
如有疑问:
进度 --> CSV 文件 --> SSIS--> SQL
服务器
When in doubt:
Progress --> CSV file --> SSIS --> SQL
Server
我很幸运地使用 SQL 链接服务器对象通过 Microsoft OLE DB Provider for ODBC Drivers 连接进度数据库。您需要使用 OpenQuery 对象来查询链接服务器,如下所示:
对于 ODBC DSN,将“高级”选项卡上的默认隔离级别设置为“READ UNCOMMITTED”
这是针对 Linux 服务器上的 Progress 10.1B 数据库使用 SQL 2005 。也许不是最优雅或最有效的解决方案,但它非常可靠。
I've had good luck using a SQL Linked Server object to connect the Progress Database, via the Microsoft OLE DB Provider for ODBC Drivers. You need to use the OpenQuery object to query the linked server, which looks like:
For the ODBC DSN setting the Default Isolation Level on the Advanced Tab to 'READ UNCOMMITTED'
This is using SQL 2005 against a Progress 10.1B db on a Linux server. Not the most elegant or efficient solution perhaps, but it's been pretty reliable.
同样的问题(通过 ODBC 的 INFORMIX 3.81 32 位驱动程序)
原因:SSIS 在空字符串处失败:''。也许它与 NULL 没有区别。
解决方案:而不是:
put:
对我有用。
Same issue here (INFORMIX 3.81 32 BIT driver via ODBC)
Reason: SSIS fails at empty strings: ''. Maybe it can`t differs it from NULL.
Resolution: instead of:
put:
works for me.