So habe ich das SQL aus einer Execute SQl-Aufgabe gezogen:
foreach (Executable executable in _Package.Executables)
{
TaskHost taskHost = executable as TaskHost;
if (taskHost != null)
{
string taskHostName = taskHost.Name;
System.Diagnostics.Debug.WriteLine("SSIS Task=" + taskHostName);
IDTSExecuteSQL iDTSExecuteSQL;
try
{
iDTSExecuteSQL = (IDTSExecuteSQL)taskHost.InnerObject as IDTSExecuteSQL;
if (iDTSExecuteSQL != null)
{
Wenn ich jetzt nur herausfinden kann, wie man SQLs aus einer Datenaufgabe extrahiert:
MainPipe pipeline = taskHost.InnerObject as MainPipe;
if (pipeline != null)
{
foreach (IDTSComponentMetaData100 componentMetadata in pipeline.ComponentMetaDataCollection)
{
try
{???
Was nun??