Red Gate forums :: View topic - Email when restore process fails
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Backup 7
SQL Backup 7 forum

Email when restore process fails

Search in SQL Backup 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
db3712



Joined: 05 May 2014
Posts: 1

PostPosted: Mon May 05, 2014 5:21 pm    Post subject: Email when restore process fails Reply with quote

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!
Back to top
View user's profile Send private message
petey



Joined: 24 Apr 2005
Posts: 2306

PostPosted: Tue May 06, 2014 4:19 am    Post subject: Reply with quote

Use the MAILTO_ONERROR option e.g.

Code:
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.

Code:
EXEC master..sqlbackup '-sql "BACKUP DATABASE model TO DISK = [<AUTO>] WITH MAILTO = [dba@myco.com]"'

_________________
Peter Yeoh
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 7
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group