Use DB Email to Send Explosion Process Notifications

You can create a SQL job to send you notifications that MRP Explosion has completed. You must complete the DB email setup and create profiles and adjust the SQL Agent to send to a profile but once that is configured you can use the send DB Email proc to send a query result.

EXEC msdb.dbo.sp_send_dbmail

@profile_name = ‘MAX System Alerts’,

@recipients = ‘joeblow@gmail.com’,

@body = ‘Daily Explosion Report’,

@subject = ‘Daily Explosion Report’,

@execute_query_database = ‘ExactMAXSAM’, << DB Name Here >>

@query = ‘select count(*) as PLs, MAX(CreationDate) as LastPLDate from ExactMAXEEC..Order_Master where type_10 = ”PL” ‘ <<SQL Select Here>>

Leave a Reply

Your email address will not be published. Required fields are marked *