How can we help you today? How can we help you today?

Email when restore process fails

Hello. We utilize a web-based application that requires us to pull data down locally for reporting purposes. We have a restore process setup hourly. Is there an option to email an individual when the restore process fails? Thanks!
db3712
0

Comments

1 comment

  • petey
    Use the MAILTO_ONERROR option e.g.
    EXEC master..sqlbackup '-sql "RESTORE DATABASE ... WITH MAILTO_ONERROR = [dba@myco.com]"'
    
    You will need to first set up your email server settings in the GUI. Then run a test, from within the GUI, and from an extended stored procedure e.g.
    EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = [<AUTO>] WITH MAILTO = [dba@myco.com]"'
    
    petey
    0

Add comment

Please sign in to leave a comment.