x
login about faq Site discussion (meta-askssc)

Corruption in a logshipped database

Suppose a primary database(which is logshipped) gets corrupted. Does it follow that the logs shipped to the secondary database also gets corrupted once it gets restored via a job step in a log shipping process? Is there a way to stop the restore job once the database corruption is detected? What other options are available once corruption rears its ugly head in a log shipped environment?

more ▼

asked Nov 09 '09 at 06:58 AM in Default

optradba gravatar image

optradba
11 3 3 3

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

The secondary database will import logs up until the last usable point. If the corruption is file / server based, then the log import will not work on the secondary database, and that will be close to the 'last known good state'.

However, if your corruption is 'a user decided to delete all the rows by accident' then that will be merrily shipped across to your secondary location.

more ▼

answered Nov 09 '09 at 08:14 AM

Matt Whitfield gravatar image

Matt Whitfield ♦♦
29.2k 56 63 87

(comments are locked)
10|1200 characters needed characters left

In addition to @Matt Whitfield's answer, though, you can mitigate (to some extent) against these issues by putting a delay on the restores into the target server. If you know that your user-deleting-everything corruption has just occurred, then you can (hopefully) stop the log restore, and extract what you need to rebuild the data, and then carry on.

Assuming your users are honest enough to tell you within the log ship/restore timeframe, that is.

more ▼

answered Feb 25 '11 at 04:11 AM

ThomasRushton gravatar image

ThomasRushton ♦
29.1k 6 9 36

Adding to @ThomasRushton - make sure the copy is not delayed and the logs are off the originating server.

Feb 25 '11 at 05:21 AM Blackhawk-17
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x49

asked: Nov 09 '09 at 06:58 AM

Seen: 2207 times

Last Updated: Nov 09 '09 at 06:58 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.