Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 2005 无法从Progress DB将数据导入SQL Server,数据类型转换是否存在问题?_Sql Server 2005_Ssis_Progress - Fatal编程技术网

Sql server 2005 无法从Progress DB将数据导入SQL Server,数据类型转换是否存在问题?

Sql server 2005 无法从Progress DB将数据导入SQL Server,数据类型转换是否存在问题?,sql-server-2005,ssis,progress,Sql Server 2005,Ssis,Progress,我正在尝试将数据从进度数据库导入MS SQL 2005 Server数据库 在SQL Server上,我右键单击我的架构名称,然后执行任务>导入数据。。。并通过向导运行 我有一个到progress安装程序的ODBC连接,没有问题,我还首先使用ODBC Explorer测试我的查询,以确保没有语法问题 我使用的声明如下: SELECT "MYTABLE"."FIRST-NAME", "MYTABLE"."LAST-NAME", "MYTABLE"."D-O-B" FRO

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

在SQL Server上,我右键单击我的架构名称,然后执行任务>导入数据。。。并通过向导运行

我有一个到progress安装程序的ODBC连接,没有问题,我还首先使用ODBC Explorer测试我的查询,以确保没有语法问题

我使用的声明如下:

SELECT "MYTABLE"."FIRST-NAME",
       "MYTABLE"."LAST-NAME",
       "MYTABLE"."D-O-B"
FROM PUB."MYTABLE"
这在ODBC资源管理器中运行良好,但当我尝试在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)
我的第一个想法可能是Progress和MSSQL之间的日期数据类型之间的问题,因此我尝试在ODBC Explorer中首先测试的语句中添加字符,但这并没有解决问题,我尝试了所有我能想到的方法,包括

在进程中使用TO_CHAR Select语句 在SSIS中的数据映射期间;尝试使用Datetime、smalldatetime和nvarchar 等 用于存储字符和NVL 将所有目标列的大小增加到200,当前无需超过50列,因此这就足够了 即使从select语句中删除该日期字段,仍然会产生相同的错误

有什么我错过的吗?是否可能源数据不正确,并且在SQL Server中不受支持

我在MSDN上发现了一些帖子,建议可能有问题,也可能有正在进行的数据列溢出的问题

这似乎是一个间歇性问题,我有其他使用日期的Progress数据导入作业,没有问题,是的,我交叉引用了所有设置,以确保没有遗漏任何内容

我唯一的选择似乎是在有疑问时从Progress>Access或其他DB>MS SQL移动数据:

进度->CSV文件->SSIS->SQL
服务器

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


dbtool位于Progress bin目录中。您需要选项2 SQL Width Scan w/Fix选项。

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

select MyField, MyOtherField from OpenQuery ([MyLinkedServer],'select MyField, MyOtherField from PUB.My_ProgressTable where dtLastUpdated > {d ''2009-01-31''}') 
对于ODBC DSN,将“高级”选项卡上的默认隔离级别设置为“读取未提交”


这是在Linux服务器上对Progress10.1B数据库使用SQL2005。也许这不是最优雅或最有效的解决方案,但它非常可靠

通过ODBC的INFORMIX 3.81 32位驱动程序也存在同样的问题

原因:SSIS在空字符串处失败:。也许它不能区别于NULL

决议:而不是:

  select col from xxx
付诸表决:


对我有用。

在我不得不处理的一个进度数据库上,我们使用了链接服务器路径,但仍然遇到了某些列的问题。
  select case when col = '' then NULL else col end col from xxx