views:

47

answers:

1

Hi, Is it possible to log the events of ssis package execution called from c#

 Application app = new Application();
 Package package = app.LoadPackage("<package_path>", null);
 package.ImportConfigurationFile("<configuration_path>");
 DTSExecResult result = package.Execute();

I need to log the messages generated during the package execution. I am using SQL Server 2008.

Thanks in advance

A: 

the Execute method has an overload for "Log"

log Type: Microsoft.SqlServer.Dts.Runtime.IDTSLogging An IDTSLogging interface.

http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.dtscontainer.execute.aspx

ScaleOvenStove
Can we have a working code sample?
nitroxn