Skip to content

Danger Danger Danger – REPAIR_ALLOW_DATA_LOSS

Steve Stedman

So years ago, when my kids were growing up, and they were watching the Discovery Channel, or Animal Planet, or whatever it was where the Crocodile Hunter was there. And I remember Steve Irwin, the Crocodile Hunter used to say Danger, Danger, Danger, and he’d go in and like deal with some crocodile or something like that. And I just remember in my mind, just this “danger, danger, danger” expression that he used to use. That’s one of those things that I just want to I mean, this display, that’s called repair log data loss should be called Danger, danger, danger, REPAIR_ALLOW_DATA_LOSS.

Derrick Bovenkamp

I remembered the danger danger. No, that’s a really good point, Steve. You know, it is so tough when we get the emails or the phone calls, where somebody is dealing with a corrupt database, and they’ve copied and pasted and already ran REPAIR_ALLOW_DATA_LOSS, and it didn’t fix the problem. And that’s correct. Not only did it not fix the problem, it probably threw out a lot of good data. Yeah, with not fixing the problem.

Steve Stedman

The problem is when somebody is trying to research things, and they find a blog post somewhere that someone who didn’t know what they’re talking about wrote, all you need to do to fix your problem is run REPAIR_ALLOW_DATA_LOSS. Yeah.

Derrick Bovenkamp

And the Microsoft warning on that is, what does it say? The least amount of thing that’ll fix this problem is REPAIR_ALLOW_DATA_LOSS.

Steve Stedman

They’re almost pushing you to just throw away your data, and you’ll be good. Well, most people can’t. Or, well, the problem is people will do that. And they won’t know what’s gone, they might have lost five patients worth of data, or they might have lost three weeks of transactions, or they might have lost who knows what with REPAIR_ALLOW_DATA_LOSS unless you really focus on what it’s doing. It just says I threw away seven pages. What was on those seven pages, or I threw away 26 pages, what was on those 26 pages? Who knows, unless you have a way of checking that ahead of time.

Derrick Bovenkamp

Yeah, and in every once in a while, we get lucky that the database is actually so corrupt, that it can’t throw anything away. Or it doesn’t get to the part of throwing anything away. But so often we we’ve hit this and it’s already thrown everything away. And the customers only chance now is to go back to their backup where we may have been able to help them. So really this is a warning. Please don’t run REPAIR_ALLOW_DATA_LOSS before you’ve really dug into the problem.

Steve Stedman

So I like to equate a quick repair low data loss is sort of like if you were doing dishes, and it was easy, everything is clean, you put up on the shelf, everything’s dirty, you just throw in the trash. It’s sort of like, well, that’s the problem. You’re not gonna have any dishes left if you do it that way. And I think with CheckDB or check table or whichever the check commands you’re using, if you use repair a lot or repair allow data loss, it is just throwing things away, and that’s not a good place to be.

Contact us before you run REPAIR_ALLOW_DATA_LOSS!

>>> Use your free 30 minute consultation <<<

 

More from Stedman Solutions:

SteveStedman5
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!

Leave a Reply

Your email address will not be published. Required fields are marked *