Need help to Create SSIS package to send mails

Hi All,

I am new to SQL Server 2005, I need Help to create a SSIS package for the below taks,

My task is Refer a Column [Status] in the Logtable which is used to maintain the logs for the running processes, When ever any Rows with the "FAIL" status in Status column occurs in the LogTable then get the Respective ErrorRowNumber and get the Details of the Error from other 2, 3 tables which will be a simple SQL statements, when you get the Error Details then mail these details to the given Email id.

For this I need a help In creating a SSIS package which will continuously check the Status and if any FAIL status occurs then the Error details need to mail to mail id which are stored in the config files of SSIS package.

If any one has better idea to send the mails then please let me know.

if any online tutorial is available that will also help.

Thanks in advance

Dhananjay



Answer this question

Need help to Create SSIS package to send mails

  • SharonD

    I would say this could all be done in T-SQL, just a a script or stored procedure. Use Database Mail to send the mail. This woudl be much easier than SSIS I think.

    To do something like thisin SSIS you would use the Execute SQL Task to check for rows and such like, and also to return information out to store in variables. The return parameters page of the task will allow you to populate variables with the query result. You would build up the email using a propery expression, or variable expression, and use that for the Send Mail task body and subject etc.

    This may be of use as well-

    Shredding a Recordset
    (http://www.sqlis.com/default.aspx 59)



  • Need help to Create SSIS package to send mails