March 12, 2008 at 9:56 pm
help anyone?
currently we are sending email when dts pkg failed. but the message is generic (eg Extraction Package Failed. Pls contact application owner.)
if i can attach the error msg/description, the recipient will have an idea what is the cause of failure.
March 13, 2008 at 10:54 am
There are a few different ways you can do this.
If the DTS package is executed via a SQL job, you can use the logging features of the job step. Edit the step that executes the DTS package and go to the Advanced tab. Enter a file path in the Output file box. This will log everything that happens to the DTS package during execution, including full error messages.
You can also set up logging in the DTS package itself. Open the Package Properties window and go to the Logging tab. Enter the necessary information in the Error handling section.
In both cases, you can add code to an Active X Script task that will attach the file to your email.
If you use Active X Script tasks, you can always add an If statement that uses the Err object. If Err.Number <> 0 then you can write some code that adds error message from Err.Description to your email. There are plenty of examples on this site and throughout the web on this.
March 14, 2008 at 4:55 am
To add some information to the post above:
You can add specific actions on a on error event, or other events.
This can be done under the tab Event Handlers when building an SSIS task.
Besides that you can of course use some general logging features provided by Microsoft to logging to the database and place an trigger on the database that sends the emails.
Good Luck,
I you might need some more information just let me know
Niels Naglé
March 14, 2008 at 6:09 am
thanks to both of you for the info.
currently, i've tried creating logs using scheduled job. and it's ok.
i'll just combine it with an *.exe we already have that automatically attach and send file.
thanks again.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply