By default whenever package fails, error will be logged in Event viewer.
But still, we can maintain the complete execution history in customized way.
In Text File Log provider, you have specify text file. And it will start logging in that text file. It will append the text at every time.
In SQL Server Log provider, it will create a table called “ssislog”. And it will start inserting records.
Mainly, we are intersted in particular error. So we can do following settings.
Ssislog table will have records like this.
Can I have a setup like this:
ReplyDeleteWhenever a record is inserted into ssislog table, mail should be sent to concerned user reporting that the package has got failed.
Assume that only OnError and OnTaskFaield events were selected.
ya,for that you can use Event handler. And there you need to set up your SMTP server connection. Then you can add Send mail Task in event handler for any particular task. You can find link related to this here in the same blog. Check out Event handlers in SSIS.
ReplyDeleteIf any issue ,please come back.Thanks
ok Thank you..
ReplyDeleteMy requirement is to send the log file across users through mail.I think it's impossible.We can only send error message.
Anyways Thanks again!!
Dear Shilpa,
ReplyDeleteIn Send Mail Task, you have one option "attachment". There you can attach your log file. And add that Send Mail Task in Event Handler. So, whenever there will be any failure in the package,that log file will be populated with the error message. After that as a part of event handler that log file will be sent with send mail task as an attachment.
Try this out, it works. Even we are using the same logic.
Please revert in case of any issue.
Hi Prashanth,
ReplyDeleteI didn't notice the option "attachment" :).
Thank You very much..
I will get back to you on some other issue..:)
Anytime:)
ReplyDelete