How to attach Job Output File to a Job's Email?

  • Within a SQL Server Job, I created a Job Output File by going to Job Properties, Steps, Edit, Advance Tab and entering an Output File Name. Then under the Notification Tab I set up the Email Options. I would like to know if there is a way to get the Job to email me the attached Output File. (This job contains two sql commands to truncate and shrink the log file. This job does not use a Maintenance Plan.) We are running Microsoft SQL Server 2005 (SP2) on Windows 2003 Server R2.

    Thanks in advance, Kevin

  • I've used xp_sendmail as the last step of the job to send attachments like that.

  • In SQL 2005, you'd use sp_send_dbmail and set the @file_attachments parameter to the name of the output file.

    Greg

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply