【发布时间】:2022-06-11 10:45:17
【问题描述】:
我正在将数据从 database_1 传输到 database_2,我在目标数据库中创建了一个表,就像源数据库中的表一样,但是当我将 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.
这是源视图:
这是目标表:
这是数据流:
这是高级编辑器:
编辑:
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
Derived Column 仅包含代码页更正,如下图所示。
【问题讨论】:
-
您能否通过帮助 > 关于 Microsoft Visual Studio 提供有关您的开发环境的信息? VS 和 SQL Server Integration Services 版本的具体版本。
-
您是否使用多个目标数据库环境?您的连接字符串值是否来自项目参数或表达式?
-
您的错误文本显示有一个 Derived Column.Outputs[Derived Column Output].Columns[DBusinessTypeNameAR]。引用的派生列的表达式是什么?
-
您的表定义说它的长度为 50。但是您在 SSIS 中将其设置为 30。您需要更正它 - 删除列并添加它
-
您需要检查派生列,并尝试先将其删除。
标签: sql-server ssis data-warehouse