Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Email after DB restore completion Expand / Collapse
Author
Message
Posted Saturday, October 20, 2012 2:27 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, September 14, 2014 1:28 AM
Points: 219, Visits: 693
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
Post #1375126
Posted Sunday, October 21, 2012 12:08 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:27 AM
Points: 35,769, Visits: 32,437
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1375191
Posted Monday, October 22, 2012 4:39 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, September 14, 2014 1:28 AM
Points: 219, Visits: 693
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.
Post #1375778
Posted Monday, October 22, 2012 6:58 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:27 AM
Points: 35,769, Visits: 32,437
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1375799
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse