加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

sql-server-2008 – SSIS:如何在另一个包中的脚本组件中重新使

发布时间:2020-12-12 16:33:25 所属栏目:MsSql教程 来源:网络整理
导读:OK …我有我的第一个使用Scripting对象的SSIS包.我点击了脚本按钮,并在Visual Studio for Applications IDE中编写了一个过程. 现在我想在另一个包中重用这个代码. 避免控制C,控制V的最佳做法是什么? 解决方法 引用MSDN重用“控制流”工具箱中出现的“脚本任
OK …我有我的第一个使用Scripting对象的SSIS包.我点击了脚本按钮,并在Visual Studio for Applications IDE中编写了一个过程.

现在我想在另一个包中重用这个代码.

避免控制C,控制V的最佳做法是什么?

解决方法

引用MSDN重用“控制流”工具箱中出现的“脚本任务”. Here is the link to MSDN.

If more than one package uses a script,consider writing a custom task instead of using the Script task. For more information,see Developing a Custom Task.

引用MSDN重用数据流任务中存在的脚本组件. Here is the link to MSDN.

The Script component provides an easy and quick way to include custom functions in a data flow. However,if you plan to reuse the script code in multiple packages,you should consider programming a custom component instead of using the Script component. For more information,see Developing a Custom Data Flow Component.

您可以查看的其他替代方案有:

>创建具有可重用逻辑的.NET库,并在GAC中注册该DLL.一旦在GAC中注册,您可以在脚本任务或脚本组件中引用该库. Here is a link描述了这一点.
>您还可以看看CozyRoc开发的第三方组件Script Task PlusScript Component Plus.

希望有帮助.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读