views:

18

answers:

1

By refering msdn website and other community i was able to run my packages programmatically. I am using a console .net application to run my ssis package. i have hardcorded the location package. it runs smoothly

DTSExecResult pkgResults;
Application app = new Application();
Package p = app.LoadPackage(@"C:\somelocation");
pkgResults = p.Execute();
if (pkgResults == DTSExecResult.Success)
    Console.WriteLine("Package ran successfully");
 else
    Console.WriteLine("Package failed");

the problem i am facing is when i fails i am unable to record which ran successfully and which has failed or stopped in between.

  1. is there anyway to log my progress programmatically in C#, should i use custom method or use their inbuild methods like DTS.LogProvider.
  2. is there anyway i could send a email stating the it has succeeded or failed.
A: 

Logging is available in ssis. You can program any number of tasks to execute on a given event, including a 'send mail' task. See this article to configure logging options in ssis

http://msdn.microsoft.com/en-us/library/ms167456.aspx

lukehayler