SQL SSIS - 值太大,无法放入缓冲区的列数据区

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24420071/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 02:07:32  来源:igfitidea点击:

SSIS - The value is too large to fit in the column data area of the buffer

sqljsonssisbufferscript-component

提问by user3268139

I'm passing a column of Json data to the script component to process. It went fine until I had a Json data that contains over 600,000 length, then the follow error occurs.

我将一列 Json 数据传递给脚本组件进行处理。一切顺利,直到我有一个包含超过 600,000 个长度的 Json 数据,然后出现跟随错误。

Error

错误

I did change the MaxBuffer size to 10MB, and my data is only around 600K but it still doesn't work, please advice.

我确实将 MaxBuffer 大小更改为 10MB,而我的数据只有 600K 左右,但仍然不起作用,请指教。

回答by Vikramsinh Shinde

There are few things you need to check -

有几件事你需要检查 -

If you are using string that is assigned to output column, go to the property of the output column and set it's length to a higher value. Set the size of the string in the output column to be bigger than that of the original string. Also compare the sizes of the input and output columns of the script task ( right click -> show advanced editor… ) and find input columns that are greater than the output columns. Pay attention to column size in the Outputs section of the Script Component.

如果您使用分配给输出列的字符串,请转到输出列的属性并将其长度设置为更高的值。将输出列中字符串的大小设置为大于原始字符串的大小。还要比较脚本任务的输入和输出列的大小(右键单击 -> 显示高级编辑器...)并找到大于输出列的输入列。注意脚本组件的输出部分中的列大小。

If you are having parent-child packages, then please note Pipeline Buffers are not shared between child and parent packages, so you need to set properties accordingly.

如果您有父子包,请注意管道缓冲区在子包和父包之间不共享,因此您需要相应地设置属性。

To check where truncation happening, try implementing DoesNotFitBufferException.

要检查截断发生的位置,请尝试实现DoesNotFitBufferException。

If you are using SQL Server 2005, then it's worth to have look to thisthread.

如果您使用的是 SQL Server 2005,那么值得查看线程。