Memory Corruptions, or Why You Need DBCC CHECKDB

  • Adam Seniuk (11/8/2012)


    Michael Meierruth (11/8/2012)


    Adam,

    There is something not right with your 'exec' statment with all those quotes and parenthesis. Can't quite grasp what it is.

    But I definitely like this 'with TABLERESULTS' clause. This definitely makes it all a lot easier.

    Thanks.

    oops, I must have copied it from a script that is running dynamic queries already. just swap out the '' to ' and it should work.

    Superb! It works like a charm! And it's definitely better than my awful hack.

  • Hey Jeff - nothing explicit, but that's going to be the topic of my next article for SSC that I'll be writing this month.

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • Thanks for clarifications.

    Daniel

  • Paul Randal (11/8/2012)


    Michael Meierruth (11/8/2012)


    After reading your recent 'Importance of Validating Backups' and now this article on DBCC CHECKSUM, I'm very curious to know how much database corruption is really encountered in the real world. I deal with a few client production databases and in the course of 10 years or so I have never run into this corruption issue - thank heaven.

    So to all the SQL Server Central community out there, to whom has this ever really happend!?

    Hundreds to thousands of times every week across the world, in the tens of millions of SQL Server databases out there. Just look at the corruption forums here. I get random emails from people at least 5 times a week asking for help with interpreting DBCC CHECKDB results, and I've been directly involved (at Microsoft, on forums, with clients, emails etc) with several thousand cases of corruption over the last 12 years.

    Thanks

    So in those several thousand cases what do you see as the main cause of these corruptions. It's ovbiously something bad at the hardware level. But what I'm looking for is things like 'having bought cheap hardware', 'not changing hardware often enough', 'bad physical environments', 'plain bad luck' i.e. 'philosophical' things like that.

  • Michael Meierruth (11/8/2012)


    So in those several thousand cases what do you see as the main cause of these corruptions. It's ovbiously something bad at the hardware level. But what I'm looking for is things like 'having bought cheap hardware', 'not changing hardware often enough', 'bad physical environments', 'plain bad luck' i.e. 'philosophical' things like that.

    I've had it happen due to a harddrive controller crapping out intermittently. And then once with a bad memory chip. These were solid machines that weren't cheap or old. Philosophically, you plan for the worst and hope for the best. Or something like that 🙂

    Look at several companies with server hardware in Lower Manhattan - they are blaming their host company for flooded hardware, saying the host company shouldn't have servers in basements. But that wouldn't have been a problem if they'd prepared for the worst and ensured that they had good offsite backups or mirrored co-location facilities outside of the disaster area. DR and BCP should not be overlooked anymore or an afterthought.

    MWise

  • The vast majority is the I/O subsystem (software or hardware), small percentage is bad memory or other server issue, and small percentage is SQL Server software bugs.

    Corruption can't be prevented, but you can prepare for it and work around it - through backups and redundant copies of the database.

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005

  • Thank you!!

    Thanks

    Dharmendra Keshari

  • Paul Randal (11/8/2012)


    Hey Jeff - nothing explicit, but that's going to be the topic of my next article for SSC that I'll be writing this month.

    Outstanding, Paul! I very much look forward to that. Thanks for the heads up!

    --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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (11/8/2012)


    Paul Randal (11/8/2012)


    Hey Jeff - nothing explicit, but that's going to be the topic of my next article for SSC that I'll be writing this month.

    Outstanding, Paul! I very much look forward to that. Thanks for the heads up!

    With you Jeff - quite often I've seen articles on "how to find" and not as many on "what next"

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Nice article.

Viewing 10 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic. Login to reply