且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SSIS:使用多播将数据输入2个相关目的地

更新时间:2022-11-05 14:35:25

简短的答案是,开箱即用,SSIS并不是为此而构建的.将数据放到表中后,目标组件将不允许发送输出流.

The short answer is that, out of the box, SSIS isn't built for that. Once you land data in a table, the destination components don't allow for an output stream to be sent.

您可以使用OLE DB Command来伪造此行为,但是由于它会为流经数据流的每一行发出单例插入语句,因此您的性能将不佳.通常,引擎尝试分批处理N个工作单元,并对数据执行批量的,基于集合的操作,以获取更大的吞吐量.您也可以使用Script Component来执行此操作.同样的性能警告仍然适用.

You could fake this behaviour out by using an OLE DB Command but your performance will be less than good since it will issue a singleton insert statement for every row that flows through the data flow. Generally, the engine attempts to batch N units of work up and perform bulk, set-based operations on the data to get more throughput. You could also use a Script Component to perform this. The same performance caveat would still apply.

更好的选择可能是将数据放入暂存表中,然后在Data flow之后使用Execute SQL Task并使用

A better option might be to land your data into a staging table and then use an Execute SQL Task after your Data flow and use the OUTPUT clause of the INSERT operation to capture those identities and then patch them into your other table.