SQL Server / DB Backup Size Last Month / Email Alert

This is one simple example how you can use sp_send_dbmail stored procedure from msdb database to send DB backup size daily.

I used folowing arguments to achive this:

@profile_name (name of an existing Database Mail profile, type sysname, default NULL),
@recipients (Is a semicolon-delimited list of e-mail addresses to send the message to, varchar(max)),
@body (Is the body of the e-mail message, nvarchar(max)),
@subject (Is the subject of the e-mail message, nvarchar(255)),
@body_format (Is the format of the message body, varchar(20))

More information about this system stored procedure you can find here sp_send_dbmail (Transact-SQL) 

 

 

And this is how final results should look like (Note, I do note have whole month backups for DB I used). You can create job and receive daily db backup size information.

 

 

Similar Posts:

Leave a Reply

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