【问题标题】:Varchar(number) causes failure in SSISVarchar(number) 导致 SSIS 失败
【发布时间】:2013-06-20 04:29:12
【问题描述】:

我正在开发一个非常简单的 SSIS 包:运行存储过程以将变量表中的数据直接导出到平面文件目标中。最初,变量表中的每一列都定义为varchar(max),到目前为止工作正常。为了提高性能,我决定对变量表应用约束,它与 varchar(max) 不兼容,我必须为其分配一个特定的数字,例如varchar(10)。在此更改之后,此 SSIS 出现了一系列错误:

Error: 0xC0202009 at ESP AL Extract, OLE DB Source [835]: An OLE DB error has
occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Native Client" 
Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was done.".
Error: 0xC0208265 at ESP AL Extract, OLE DB Source [835]: Failed to retrieve
long data for column "SR_RequestID".
Error: 0xC020901C at ESP AL Extract, OLE DB Source [835]: There was an error 
with output "OLE DB Source Output" (846) on component "OLE DB Source" (835).
The column status returned was: "DBSTATUS_UNAVAILABLE".
Error: 0xC0209029 at ESP AL Extract, OLE DB Source [835]: The "output
"OLE DB Source Output" (846)" failed because error code 0xC0209071 occurred,
and the error row disposition on "component "OLE DB Source" (835)" specifies 
failure on error. An error occurred on the specified object of the 
specified component.

平面文件列数据类型为string[DT_STR]。任何想法表示赞赏。

【问题讨论】:

  • MAX 列和 SSIS 是一个糟糕的组合。绝对避免!

标签: ssis varchar


【解决方案1】:

试试这个:-

右键OLEDB Source并选择Show Advanced Editor。在Input Output Properties中展开Oledb Source outputOutput Columns。选择列并将数据类型更改为String[DT_STR],长度为10。

您收到错误的原因是,当您第一次创建数据类型为 varchar(max) 的存储过程时,SSIS 将列转换为 DT_TEXT。因此,一旦将列数据类型更改为 varchar(10) ,SSIS 未能将varchar 转换为text stream。因此失败。

【讨论】:

  • 仍然无法正常工作。原值为255,还不够吗?
  • SP 中使用的列的数据类型和 flat flat destination 中列的数据类型是什么?
  • varchar(7) 来自 SP;长度为 7 的字符串 [DT_STR](原始 255 但也不起作用)用于平面文件。
  • 当您将OLEDB source output Column 数据类型转换为 DT_STR 时,它在源组件中是否仍然失败?
  • 来源!我选择了目的地之一。谢谢 praveen,已解决。
猜你喜欢
  • 2010-11-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-10
相关资源
最近更新 更多