如何以编程方式创建SSIS包?

编程入门 行业动态 更新时间:2024-10-08 00:33:24
本文介绍了如何以编程方式创建SSIS包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试以编程方式创建一个SSIS包,其中包含在同一数据库中从表A到表B的简单数据流。我正在使用此处给出的示例。 该包已创建并保存到dtsx文件,但是当我在Visual Studio中打开它时,我看到未选择源表和目标表。

I am trying to programmatically create an SSIS package containing a simple data flow from table A to table B in the same database. I am using the example given here. The package gets created and saved to a dtsx file, but when I open it in visual studio I see that the source and destination tables have not been selected.

我还想在转换任务到达目的地之前插入一个转换任务。

I also want to insert a transformation task in between before it reaches the destination.

我已经设法选择了源表和目标表,任务甚至成功运行了。原来我需要

Well I have managed to get the source and destination tables selected and the task even ran successfully. Turns out I needed to

(a)分别使用一个oleDB连接作为源和目标[我不喜欢这种方式;我只想使用一个连接]

(a) use one oleDB connection each for the source and destination [I don't like this way; I want to use one connection only]

(b)在目标 SetComponentProperty( AccessMode,3)中将Accessmode设置为3。 等同于表格或视图-快速加载。

(b) set the Accessmode to 3 in the destination SetComponentProperty("AccessMode", 3) which equates to Table or View - fast load.

在某处是否有一些文档。我所能找到的只是 SetComponentProperty 的功能,而不是它可以使用的所有参数。例如。除了 AccessMode之外,我还能在那放什么呢?第二个参数3或2或1代表什么?

Is there some documentation on this somewhere. All I can find is what SetComponentProperty does, and not what all parameters it can take to do that. eg. what else can I put there besides "AccessMode"?, what does the second parameter 3 or 2 or 1 stand for?

仍然尝试映射别名。 STOCK:PipelineTask表示数据流任务。是什么意思呢...复制列?

Still trying to map the monikers. STOCK:PipelineTask means DataFlow Task. What is the moniker for say... copy column?

推荐答案

是的,这是我对SSIS的不满之一:不提供新术语的简单表格或地图。

Yes, this is one of my frustrations with SSIS: that they do not provide simple table or map of the new terminology.

您可以使用一小段代码来发现可用的组件。

You can use a small piece of code to discover components available for use.

代码位于此处: msdn.microsoft/zh-CN /library/ms136106.aspx

当我运行它时,我发现复制列的绰号是:名称:复制列 CreationName:DTSTransform.CopyMap.1

When I ran it, I found the moniker for copy column to be: Name: Copy Column CreationName: DTSTransform.CopyMap.1

更多推荐

如何以编程方式创建SSIS包?

本文发布于:2023-11-28 11:18:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642188.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方式   SSIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!