Launch week: the Season Pass & Fundamentals Week are 50% off — ends in 14d 03h 21mSee the sale

Category: CHECKDB and Corruption

3 Ways to Run DBCC CHECKDB Faster

In my last post, I talked about how you can get 43%-67% faster backups. Today, I'm using that same SQL Server setup to discuss how throwing more CPU cores might help you check for corruption faster if you've already got modern fast storage. I don't expect everyone to go to this level of detail by any means, but it's the kind of tuning you can do when you're facing multiple terabytes of production data per server and shrinking maintenance windows.

Read more about 3 Ways to Run DBCC CHECKDB Faster 20 comments — Join the discussion

Can I Offload DBCC CHECKDB To Another Server?

You want to check for corruption, but you don't want to slow down your primary production server.

In this post, I'm specifically talking about offloading the corruption checking process. I'm not talking about doing corruption checking on both the primary and other servers - that's wonderful, and if you're doing that, you should hug yourself. You're doing a good job. Who's a good dog? You are! Good dog.

Read more about Can I Offload DBCC CHECKDB To Another Server? 29 comments — Join the discussion

Let’s Corrupt a Database Together, Part 3: Detecting Corruption

So far in this series, I've shown you how to corrupt a clustered index, then how nonclustered indexes can be corrupted independently. If you haven't read those, you should start there first.

Let's start again with our 50Ways database, but this time we're going to be good and make sure that we've got checksums enabled, and that we're in full recovery model:

Read more about Let’s Corrupt a Database Together, Part 3: Detecting Corruption 5 comments — Join the discussion

Let’s Corrupt a Database Together, Part 2: Nonclustered Indexes

In part 1, I showed you how to corrupt a database - not because you'd need to do it, or because SQL Server has some kind of vulnerability. I just wanted to show you how SQL Server reacts when it finds corruption in a data file, why you should check your databases for CHECKSUM settings, and set up alerts so you can react fast.

Read more about Let’s Corrupt a Database Together, Part 2: Nonclustered Indexes 18 comments — Join the discussion

Let’s Corrupt a SQL Server Database Together, Part 1: Clustered Indexes

Hold my beer. [crayon-6a3ee30c32c36078184786/] Now, let's corrupt it. Open it with a hex editor - my personal favorite is the free xvi32 because it doesn't require installation. Just download it, fire it up (you'll want to run it as administrator), and open the database's MDF file: Next thing you know, you're looking at the contents…

Read more about Let’s Corrupt a SQL Server Database Together, Part 1: Clustered Indexes 27 comments — Join the discussion
Production DBA

SQL Server Timeouts During Backups and CHECKDB

So you're hosting your SQL Server in the cloud - say Amazon EC2, Azure VM, or Google Compute Engine - and you've noticed that when you're running a backup or a DBCC CHECKDB, you suffer from extreme performance problems.

Queries run slow, and even worse, applications report timeout errors even just trying to connect to SQL Server. More symptoms can include database mirroring and cluster failovers. What's going on?

Read more about SQL Server Timeouts During Backups and CHECKDB 19 comments — Join the discussion

SQL Server 2016 Maintenance Plan Improvements

Let's just get one thing out of the way first.

Yes, I understand that you, dear reader, probably hate maintenance plans. You associate them with everything dumb that you did early on in your career, like setting up a single plan that reorganized indexes, then rebuilt them, then updated their statistics. You are older and wiser now, and you swear by tools like Ola Hallengren's maintenance scripts or Minion Reindex.

Read more about SQL Server 2016 Maintenance Plan Improvements 12 comments — Join the discussion
Production DBA

What to Do When DBCC CHECKDB Reports Corruption

The instant you encounter corruption in a production SQL Server database, stop. Read this entire article first to understand the big picture, and then come back here to take action. First, understand that you shouldn't start by trying to repair the corruption. You may be facing a storage subsystem problem where your storage is corrupting…

Read more about What to Do When DBCC CHECKDB Reports Corruption 36 comments — Join the discussion