SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Email after DB restore completion


Email after DB restore completion

Author
Message
Mac1986
Mac1986
Mr or Mrs. 500
Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)

Group: General Forum Members
Points: 565 Visits: 791
Hi,
I have a DB that gets restored from from different server everyday. Once the database restore is completed, I would like to get a n email saying restore is complete. The restore will happen some time between 11:00 am and 5:00 PM. Not sure how to configure an email in this case
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88170 Visits: 41128
Is it a scheduled job? If so, just add an extra step to send an email.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Mac1986
Mac1986
Mr or Mrs. 500
Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)

Group: General Forum Members
Points: 565 Visits: 791
Hi,
Yes its a Store proc which gets called remotely and the restore happens through network. Now if I have to add a another step or another few lines in that Store proc. I need to go through SDLC(Dev & Engg) and which is going to take a lot of time.

Instead I would like to design a job on the target server which checks the msdb..RestoreHistory . If I have the database with today's time stamp, then shoot and email saying Publish is complete. Out database publish happens only once a day.

Not sure how to tweak the column "Restore_Date" according to my requirement which is today's Time stamp.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88170 Visits: 41128
Mac1986 (10/22/2012)
Hi,
Yes its a Store proc which gets called remotely and the restore happens through network. Now if I have to add a another step or another few lines in that Store proc. I need to go through SDLC(Dev & Engg) and which is going to take a lot of time.

Instead I would like to design a job on the target server which checks the msdb..RestoreHistory . If I have the database with today's time stamp, then shoot and email saying Publish is complete. Out database publish happens only once a day.

Not sure how to tweak the column "Restore_Date" according to my requirement which is today's Time stamp.


That's what I'm saying... just create an SQL Server Job (a "Maintenance Task" would do) to call the proc and send an email with whether or not the proc ran correctly or not.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search