SSIS OLE DB源中的不正确外部列长度
我正在将数据从数据库_1传输到数据库_2,我创建了一个表i目标db,就像源db中的db一样,但是当我将ole db源连接到表并打开表格编辑器时,我发现了外部列长度的长度特定列不同,SQL Server中的长度为VARCHAR(50),但高级编辑器中的SSIS是DT_SRT(30)。我尝试编辑它,但是当我再次检查时,它再次变成30。
当我执行软件包时,错误上升,说列在列上发生截断,执行停止。
[Derived Column [2]] Error: The "Derived Column" failed because truncation occurred, and the
truncation row disposition on "Derived Column.Outputs[Derived Column
Output].Columns[DBusinessTypeNameAR]" specifies failure on truncation. A truncation error
occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on
component "Derived Column" (2) failed with error code 0xC020902A while processing input
"Derived Column Input" (3). The identified component returned an error from the ProcessInput
method. The error is specific to the component, but the error is fatal and will cause the Data
Flow task to stop running. There may be error messages posted before this with more
information about the failure.
[OLE DB Source [79]] Error: The attempt to add a row to the Data Flow task buffer failed with
error code 0xC0047020.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE
DB Source 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.
这是源视图:
这是目标表:
href =“ https://i.sstatic.net/datln.png” rel =“ nofollow noreferrer”>
这是高级编辑:
Microsoft SQL Server Data Tools for Visual Studio 2017
Version 15.9.15
VisualStudio.15.Release/15.9.15+28307.812
Microsoft .NET Framework
Version 4.7.03062
****************************
SQL Server Data Tools 15.1.61906.03120
Microsoft SQL Server Data Tools
SQL Server Integration Services 15.0.1301.433
Microsoft SQL Server Integration Services Designer
Version 15.0.1301.433
I am transferring data from database_1 to database_2, I created a table i the destination DB like the one in the source DB, but when I connect the OLE DB source to the table and open the Advanced editor I found that the External column length for a specific column is different, the length in the sql server is varchar (50) but in the SSIS in Advanced editor is DT_SRT (30). I tried to edit it but when I check again it turned into 30 again.
When I execute the package an error rise saying that truncatination occurred on the column and the execution stops.
[Derived Column [2]] Error: The "Derived Column" failed because truncation occurred, and the
truncation row disposition on "Derived Column.Outputs[Derived Column
Output].Columns[DBusinessTypeNameAR]" specifies failure on truncation. A truncation error
occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on
component "Derived Column" (2) failed with error code 0xC020902A while processing input
"Derived Column Input" (3). The identified component returned an error from the ProcessInput
method. The error is specific to the component, but the error is fatal and will cause the Data
Flow task to stop running. There may be error messages posted before this with more
information about the failure.
[OLE DB Source [79]] Error: The attempt to add a row to the Data Flow task buffer failed with
error code 0xC0047020.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on OLE
DB Source 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.
this is the source view :
this is the destination table :
this is the data flow :
this is the advance editor :
EDIT:
Microsoft SQL Server Data Tools for Visual Studio 2017
Version 15.9.15
VisualStudio.15.Release/15.9.15+28307.812
Microsoft .NET Framework
Version 4.7.03062
****************************
SQL Server Data Tools 15.1.61906.03120
Microsoft SQL Server Data Tools
SQL Server Integration Services 15.0.1301.433
Microsoft SQL Server Integration Services Designer
Version 15.0.1301.433
the Derived Column only contains code page correction as the screenshot below.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里有两种不同的事情。
1。从派生列中的字符串截断错误
请注意,截断消息来自您的派生列而不是目标列。派生的列的长度为10,而不是30(或50)。将dbusinessTypenamear列的大小增加到30
(dt_str,30,1252)
或50(dt_str,50,1252)
应删除错误。2。单同步目标列元数据
如果您的设计时间数据库的列元数据不匹配运行时数据库的列的元数据(您在评论中说,目标数据库连接字符串是由表达式)这可以解释非同步目标数据库列元数据。
如果您确保了两个DB“方案”(设计时DB和运行时DB)具有相同的字段元数据,这是重新同步的最简单方法OLEDB数据库目标组件是:
There are two different things going on here.
1. String truncation error from a Derived Column
Note that the truncation message is coming from your Derived Column not the destination column. The derived column's length is 10, not 30 (or 50). Increasing the size of your DBusinessTypeNameAR derived column to 30
(DT_STR,30,1252)
or 50(DT_STR,50,1252)
should remove the error.2. Out-of-sync destination column metadata
If your design-time database's column meta-data does not match the run-time database 's column meta-data (you said in the comments your target database connection string was set by an expression) this may explain the out-of-sync destination database column metadata.
If you've ensured that the two db 'scenarios' (design-time db and run-time db) have the same field meta-data, the simplest way to re-sync out-of-sync destination table column meta-data for OLEDB Database destination component is to: