SSIS:提取OLE DB目标对象的目标表

时间:2013-06-11 01:11:59

标签: sql-server-2008 ssis

我正在尝试使用SQL Server SSIS API库来确定来自所有软件包的extac信息,包括正在OLE DB目标对象中填充的目标表。

我看到Pipeline(数据流任务)中的一个对象是OLE DB目的地(Class ID 5A0B62E8-D91D-49F5-94A5-7BE58DE508F0)但是对于我的生活我无法弄清楚是什么界面将循环变量“componentMetadata”强制转换为获取目标表的名称。

 foreach (IDTSComponentMetaData100 componentMetadata in pipeline.ComponentMetaDataCollection)
 {

 }

你能帮忙吗?

1 个答案:

答案 0 :(得分:1)

Sum btch。我在问完后就找到了。

string targetTableName = componentMetadata.OutputCollection[0].Component.CustomPropertyCollection["OpenRowset"].Value.ToString();