Find Missing Backups and send the report

  • Comments posted to this topic are about the item Find Missing Backups and send the report

  • You can add this to your code to dynamically pick the default profile name value from the instance.

    declare @profile_name varchar(56)

    select @profile_name = a.name

    from msdb..sysmail_profile as a

    inner join msdb..sysmail_profileaccount as b

    on a.profile_id=b.profile_id

    inner join msdb..sysmail_account as c

    on b.account_id= c.account_id

    EXEC msdb.dbo.sp_send_dbmail

    @from_address='',

    @recipients= @oper_email,

    @subject = @strsubject,

    @body = @tableHTML,

    @body_format = 'HTML',

    @profile_name=@profile_name

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

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