dbTalk Databases Forums  

Last time RESTORE happened

microsoft.public.sqlserver.programming microsoft.public.sqlserver.programming


Discuss Last time RESTORE happened in the microsoft.public.sqlserver.programming forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Abba
 
Posts: n/a

Default Last time RESTORE happened - 12-07-2009 , 09:55 PM






Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next morning
users have the "latest" data on ServerB. Quite often, this restore doesnt
run, like someone accidentaly disabling the refresh job, or serverB being
shuwdown and thus missing the job schedule etc. In those cases, we come to
know about this only when the users login the next day and report data not
being "accurate". Then it would mean 2-3 hour downtime for their app as we
go ahead and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the last
date that it was refeshed. Based on the output, it will alert us so that we
can be proactive. Is this a feasible solution? If so, how can I find the
time when the database was last restored?


tia,
AbbA

Reply With Quote
  #2  
Old   
Jay
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-07-2009 , 10:58 PM






If your using SQL BACKUP/RESTORE, the logs will be in the msdb database as
well as the SQL Server logs. I'd have to check exactly where, but you can do
that too; besides, I don't have 2000 installed anymore

Still, your suggested solution bothers me and your two reasons for failure
bother me even more.

How on earth does a job get accidentally disabled?
Why isn't the person the person taking a machine down making sure the jobs
are run when their done?

Sounds like you have a bigger people problem, than a programming/admin
problem.


"Abba" <sql_help (AT) aaa (DOT) com> wrote

Quote:
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this restore
doesnt run, like someone accidentaly disabling the refresh job, or serverB
being shuwdown and thus missing the job schedule etc. In those cases, we
come to know about this only when the users login the next day and report
data not being "accurate". Then it would mean 2-3 hour downtime for their
app as we go ahead and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the last
date that it was refeshed. Based on the output, it will alert us so that
we can be proactive. Is this a feasible solution? If so, how can I find
the time when the database was last restored?


tia,
AbbA

Reply With Quote
  #3  
Old   
Abba
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-07-2009 , 11:28 PM



I am aware that the info would be in msdb. Just couldn't find the exact
table, hence the query.

Regarding the other queries, sorry I do not have an answer(though I wish I
knew). All I can say that these things happen as long as humans are running
the computers . If none of these would have happened as in an ideal world,
then all those companies making Monitoring software would have been out of
business!

"Jay" <spam (AT) nospam (DOT) org> wrote

Quote:
If your using SQL BACKUP/RESTORE, the logs will be in the msdb database as
well as the SQL Server logs. I'd have to check exactly where, but you can
do that too; besides, I don't have 2000 installed anymore

Still, your suggested solution bothers me and your two reasons for failure
bother me even more.

How on earth does a job get accidentally disabled?
Why isn't the person the person taking a machine down making sure the jobs
are run when their done?

Sounds like you have a bigger people problem, than a programming/admin
problem.


"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this
restore doesnt run, like someone accidentaly disabling the refresh job,
or serverB being shuwdown and thus missing the job schedule etc. In
those cases, we come to know about this only when the users login the
next day and report data not being "accurate". Then it would mean 2-3
hour downtime for their app as we go ahead and start the refresh during
"production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the last
date that it was refeshed. Based on the output, it will alert us so that
we can be proactive. Is this a feasible solution? If so, how can I find
the time when the database was last restored?


tia,
AbbA



Reply With Quote
  #4  
Old   
Jay
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 12:13 AM



There aren't that many tables in msdb, just manually check them all. It
should only take about 10 minutes.

Once you find the right table, check the docs in BOL.

"Abba" <sql_help (AT) aaa (DOT) com> wrote

Quote:
I am aware that the info would be in msdb. Just couldn't find the exact
table, hence the query.

Regarding the other queries, sorry I do not have an answer(though I wish I
knew). All I can say that these things happen as long as humans are
running the computers . If none of these would have happened as in an
ideal world, then all those companies making Monitoring software would
have been out of business!

"Jay" <spam (AT) nospam (DOT) org> wrote in message
news:OkRMOM8dKHA.4724 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
If your using SQL BACKUP/RESTORE, the logs will be in the msdb database
as well as the SQL Server logs. I'd have to check exactly where, but you
can do that too; besides, I don't have 2000 installed anymore

Still, your suggested solution bothers me and your two reasons for
failure bother me even more.

How on earth does a job get accidentally disabled?
Why isn't the person the person taking a machine down making sure the
jobs are run when their done?

Sounds like you have a bigger people problem, than a programming/admin
problem.


"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this
restore doesnt run, like someone accidentaly disabling the refresh job,
or serverB being shuwdown and thus missing the job schedule etc. In
those cases, we come to know about this only when the users login the
next day and report data not being "accurate". Then it would mean 2-3
hour downtime for their app as we go ahead and start the refresh during
"production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the
last date that it was refeshed. Based on the output, it will alert us so
that we can be proactive. Is this a feasible solution? If so, how can I
find the time when the database was last restored?


tia,
AbbA





Reply With Quote
  #5  
Old   
Abba
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 12:31 AM



Please ignore. Found it in:
http://www.mssqltips.com/tip.asp?tip=1724

"Abba" <sql_help (AT) aaa (DOT) com> wrote

Quote:
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this restore
doesnt run, like someone accidentaly disabling the refresh job, or serverB
being shuwdown and thus missing the job schedule etc. In those cases, we
come to know about this only when the users login the next day and report
data not being "accurate". Then it would mean 2-3 hour downtime for their
app as we go ahead and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the last
date that it was refeshed. Based on the output, it will alert us so that
we can be proactive. Is this a feasible solution? If so, how can I find
the time when the database was last restored?


tia,
AbbA

Reply With Quote
  #6  
Old   
Jay
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 12:55 AM



[msdb].[dbo].[restorehistory]

"Abba" <sql_help (AT) aaa (DOT) com> wrote

Quote:
I am aware that the info would be in msdb. Just couldn't find the exact
table, hence the query.

Regarding the other queries, sorry I do not have an answer(though I wish I
knew). All I can say that these things happen as long as humans are
running the computers . If none of these would have happened as in an
ideal world, then all those companies making Monitoring software would
have been out of business!

"Jay" <spam (AT) nospam (DOT) org> wrote in message
news:OkRMOM8dKHA.4724 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
If your using SQL BACKUP/RESTORE, the logs will be in the msdb database
as well as the SQL Server logs. I'd have to check exactly where, but you
can do that too; besides, I don't have 2000 installed anymore

Still, your suggested solution bothers me and your two reasons for
failure bother me even more.

How on earth does a job get accidentally disabled?
Why isn't the person the person taking a machine down making sure the
jobs are run when their done?

Sounds like you have a bigger people problem, than a programming/admin
problem.


"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this
restore doesnt run, like someone accidentaly disabling the refresh job,
or serverB being shuwdown and thus missing the job schedule etc. In
those cases, we come to know about this only when the users login the
next day and report data not being "accurate". Then it would mean 2-3
hour downtime for their app as we go ahead and start the refresh during
"production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the
last date that it was refeshed. Based on the output, it will alert us so
that we can be proactive. Is this a feasible solution? If so, how can I
find the time when the database was last restored?


tia,
AbbA





Reply With Quote
  #7  
Old   
Bob Barrows
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 08:48 AM



I'm glad you found it, but I'm curious why you aren't using replication
or log shipping, neither of which requires the application to be shut
down.

Abba wrote:
Quote:
Please ignore. Found it in:
http://www.mssqltips.com/tip.asp?tip=1724

"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the
latest backup from ServerA. This refresh happens at night so that
the next morning users have the "latest" data on ServerB. Quite
often, this restore doesnt run, like someone accidentaly disabling
the refresh job, or serverB being shuwdown and thus missing the job
schedule etc. In those cases, we come to know about this only when
the users login the next day and report data not being "accurate".
Then it would mean 2-3 hour downtime for their app as we go ahead
and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the
last date that it was refeshed. Based on the output, it will alert
us so that we can be proactive. Is this a feasible solution? If so,
how can I find the time when the database was last restored?



--
HTH,
Bob Barrows

Reply With Quote
  #8  
Old   
TheSQLGuru
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 10:46 AM



Your solution to base something on serverB is useless if serverB is shutdown
or THAT job disabled, right? :-)

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Abba" <sql_help (AT) aaa (DOT) com> wrote

Quote:
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this restore
doesnt run, like someone accidentaly disabling the refresh job, or serverB
being shuwdown and thus missing the job schedule etc. In those cases, we
come to know about this only when the users login the next day and report
data not being "accurate". Then it would mean 2-3 hour downtime for their
app as we go ahead and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the last
date that it was refeshed. Based on the output, it will alert us so that
we can be proactive. Is this a feasible solution? If so, how can I find
the time when the database was last restored?


tia,
AbbA

Reply With Quote
  #9  
Old   
Jay
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 12:54 PM



That is why I tried to stress he had a people problem, not a programming
problem.

However, if he does something with the startup script functionality, he can
get around the server being down when the job wads supposed to run.


"TheSQLGuru" <kgboles (AT) earthlink (DOT) net> wrote

Quote:
Your solution to base something on serverB is useless if serverB is
shutdown
or THAT job disabled, right? :-)

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the latest
backup from ServerA. This refresh happens at night so that the next
morning users have the "latest" data on ServerB. Quite often, this
restore
doesnt run, like someone accidentaly disabling the refresh job, or
serverB
being shuwdown and thus missing the job schedule etc. In those cases,
we
come to know about this only when the users login the next day and
report
data not being "accurate". Then it would mean 2-3 hour downtime for
their
app as we go ahead and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the
last
date that it was refeshed. Based on the output, it will alert us so that
we can be proactive. Is this a feasible solution? If so, how can I find
the time when the database was last restored?


tia,
AbbA



Reply With Quote
  #10  
Old   
Abba
 
Posts: n/a

Default Re: Last time RESTORE happened - 12-08-2009 , 10:59 PM



The App owners do not want updated data. Only the data from the previous day
..

"Bob Barrows" <reb01501 (AT) NOyahoo (DOT) SPAMcom> wrote

Quote:
I'm glad you found it, but I'm curious why you aren't using replication
or log shipping, neither of which requires the application to be shut
down.

Abba wrote:
Please ignore. Found it in:
http://www.mssqltips.com/tip.asp?tip=1724

"Abba" <sql_help (AT) aaa (DOT) com> wrote in message
news:ONdpYq7dKHA.2460 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

[SQL2000 latest sp]

We have a daily database restore that refreshes ServerB with the
latest backup from ServerA. This refresh happens at night so that
the next morning users have the "latest" data on ServerB. Quite
often, this restore doesnt run, like someone accidentaly disabling
the refresh job, or serverB being shuwdown and thus missing the job
schedule etc. In those cases, we come to know about this only when
the users login the next day and report data not being "accurate".
Then it would mean 2-3 hour downtime for their app as we go ahead
and start the refresh during "production" hours.

I am thinking of a way to tackle this. My plan is to create and run a
monitor job in ServerB that will query the database and find out the
last date that it was refeshed. Based on the output, it will alert
us so that we can be proactive. Is this a feasible solution? If so,
how can I find the time when the database was last restored?




--
HTH,
Bob Barrows


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.