Browse by Tags

Tagged Content List
  • Blog Post: Example corrupt database to play with and some backup/restore things to try

    I've been asked several times over the last few weeks for an example corrupt database to play with, and for testing logic built around DBCC CHECKDB. The attached WinZip file contains a backup of a simple 2005 database called 'broken' (I can do a 2000 one too if there's enough demand). It has a simple...
  • Blog Post: Oh no – my backup is corrupt too! Help!

    Funny how a bunch of people all seem to have the same problem at the same time. Maybe it’s just that people don’t want to talk about corruption until someone else does – it’s like a dark secret that once let out of the bag – everyone talks. The common HA/DR issue over the last few days on the newsgroups...
  • Blog Post: How long does *your* CHECKDB take?

    Following on from my post a couple of weeks ago ( https://blogs.msdn.com/sqlserverstorageengine/archive/2007/01/24/how-long-will-checkdb-take-to-run.aspx ), I'm very interested to know how long it takes for your CHECKDBs to run, so I can get an idea of the distribution of run-times on various kinds of...
  • Blog Post: CHECKDB (Part 8): Can repair fix everything?

    I was teaching at a Microsoft-internal class last week and there was a discussion on what corruptions can't be repaired using DBCC. At the same time, several threads popped up on forums and newsgroups with people hitting some of this unrepairable corruptions so I thought that would make a good topic...
  • Blog Post: CHECKDB (Part 7): How long will CHECKDB take to run?

    This is a question I see every so often and it cropped up again this morning so I'll use it as the subject for this week's blog post. There are several ways I could answer this: the unhelpful answer - I've got no idea. the almost-helpful answer - how long did it take to run last time and...
  • Blog Post: Fixing damaged pages using page restore or manual inserts

    Here's an interesting scenario that cropped up today. You have a database on a RAID array that failed and has zero'd out a page. How can you get the data back? There are two ways to do it, depending on the database recovery model and version of SQL Server - single-page restore or manual insert/select...
  • Blog Post: More undocumented fun: DBCC IND, DBCC PAGE, and off-row columns

    (Final blog post of the year for me. Its been a bit of a wild ride the last 6 months - 7 TechEds on 3 continents, 46 blog posts and some major life changes - but now things have calmed down and I should be back to more regular posting in 2007. Tomorrow I fly out to Wakatobi in Indonesia to go diving...
  • Blog Post: CHECKDB (Part 6): Consistency checking options for a VLDB

    (Yippee - just finished my certification dives and got my PADI Open Water certification - just in time for our dive trip to Indonesia in December :-) This is a question that comes up a lot - in fact 3 times this week already - most recently during a guest lecture I did on DBCC for one of Kimberly...
  • Blog Post: CHECKDB (Part 5): What does CHECKDB really do? (part 4 of 4)

    (Another airport, another blog post - I really must make an effort to come up with more original banter - I'm sure I've used that line before. TechEd Guangzhou has finished and I'm on the way to Beijing for TechEd #3. Checking in and getting through security were challenging to say the least this morning...
  • Blog Post: CHECKDB (Part 4): What does CHECKDB really do? (part 3 of 4)

    (OK - I was wrong about the posting frequency - events overtook me and I got bogged down preparing for these TechEds. China is an amazing place and I wish I had more time to soak up some of its culture while I'm here but with the TechEds being so close together there's little time for anything except...
  • Blog Post: Don't try this at home kids... (data recovery using DBCC PAGE)

    Time to cough up a real-life data recovery scenario to temporarily stop those people who badger me relentlessly for scenarios... We have a situation currently with a customer who managed to delete all their data during a SAN reconfig and then found out that their tape backups hadn't been working properly...
  • Blog Post: Poking about with DBCC PAGE (Part 1 of ?)

    (It's been a while since I last posted - summer fun's been in the way obviously and I've been busy picking up some new and exciting (for me) SQL skills, partially to help with four upcoming TechEds I'll be doing in China and Hong Kong. The posting frequency should increase towards the end of the week...
  • Blog Post: Can't I ever get a guarantee?

    I've been sitting and thinking a lot about guarantees this morning while drinking coffee in the debilitating heat here (85 degrees at 11am) and things get more complicated the more I think about it, so time to stop and post some thoughts. Over the last few days, the question of guarantees has come...
  • Blog Post: CHECKDB (Part 3): What does CHECKDB really do? (2 of 4)

    In the previous post of this series, I covered the system table checks that have to be done before anything else can be checked by CHECKDB. Now that I've described pages , extents , IAM chains/allocation units and the major allocation bitmaps , in this post I'll cover the allocation checks. 1. Primitive...
  • Blog Post: CHECKDB (Part 2): What does CHECKDB really do? (1 of 4)

    Hmmm - I sat for 5 minutes thinking of something amusing to say to start this one off and nothing came to mind, so I'm afraid this will be a humor-free post. Maybe I'm jet-lagged from being on the East coast all last week. As with all things related to DBCC, this topic has its share of misinformation...
  • Blog Post: Ta da! Emergency mode repair

    Emergency mode repair? In a couple of previous posts I explained how the two worst things you could do to your database are rebuilding your transaction log and running REPAIR_ALLOW_DATA_LOSS . Well, in SQL Server 2005, we combined them into a new documented feature! Are you off your head, I hear you...
  • Blog Post: Do you need to run CHECKDB because of SQL Server?

    I was asked this several times at TechEd so I'd like to answer it publicly. It's kind of complicated to explain so bear with me as I do it. Basically, NO! Earlier versions of SQL Server (for example, 6.5) had their problems but from 7.0 the storage engine has gone from strength to strength and...
  • Blog Post: Which part of 'REPAIR_ALLOW_DATA_LOSS' isn't clear?

    In my chalk/talk at TechEd yesterday, I asked the crowd "what's the purpose of repair?" One person got it right. The purpose is not to save data. Surprised? The purpose is to get the database back to a structurally and transactionally consistent state so that processing can safely continue. We chose...
  • Blog Post: When should you rebuild the transaction log?

    10 points if you answered "don't be daft, never! " and minus several million is you answered anything else. Yes, if you have no backups and your hardware has corrupted your transaction log then you have no choice but to rebuild it, but this should never happen because you all have backup strategies,...
  • Blog Post: Here's a good reason not to run SHRINKDATABASE...

    .. this is an old one, but its poorly understood and it just surfaced again today so I thought I'd share it. Situation: customer keeps his indexes nicely defragemented during the day so that his range scan queries perform well. Every morning, he comes in to find the logical scan fragmentation up around...
  • Blog Post: How to use DBCC PAGE

    Yes, finally I come clean and tell all. It's an open secret that there's an undocumented DBCC command called DBCC PAGE that you can use to look at the contents of database pages. I've recommended in forum postings that people use it and Product Support also asks customers to use it during various investigations...
  • Blog Post: CHECKDB (Part 1): How does CHECKDB get a consistent view of the database?

    As you can guess from the title, I'm planning a long series over the summer to go into the guts of how CHECKDB works (both the consistency checks part and the repair part). And as you can guess from 'CHECKDB', I'm already bored with putting DBCC in front of it all the time and changing the font to Courier...
  • Blog Post: Common bad advice around disaster recovery

    I've just been itching to post this one. I'm doing a chalk-talk (AKA cabana session, this year AKA Technical Learning Centre session) at TechEd next Wednesday (8.30am 6/14) called 'DBCC CHECKDB: Magic, Monsters, and Myths'. A lot of the material in this will be included in the mega-whitepaper on DBCC...
  • Blog Post: Repair vs Restore Dilemma

    For some reason The Clash's 'Should I Stay or Should I Go?' has been going round in my head today - 'Should I RE-pair or restore? Nah nah NA-na nana nah' - must be something to do with Redmond's good weather. Anyway, I get asked for help with this a lot - more so it seems over the last year or so...
Page 1 of 1 (24 items)