简体   繁体   中英

is it possible to log events of ssis package execution using c# to a file

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM