Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 DBCC CheckDB space issues

Author  Topic 

ranvir_2k
Posting Yak Master

180 Posts

Posted - 2011-02-02 : 05:55:56
I was wondering why performing DBCC CheckDB can sometimes cause disk space to run out? Why doesn't SQL Server just put the data into memory?

Thanks

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-02-02 : 06:18:50
CheckDB uses a hidden database snapshot to get a consistent view of the database. Like any other snapshot, it will grow if there's activity on the source DB.

If it's severe, try doing checkDB during a quiet time. If you're using Enterprise edition, create your own database snapshot on another drive and checkDB that. There are other options.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

ranvir_2k
Posting Yak Master

180 Posts

Posted - 2011-02-02 : 06:34:33
Thanks for the reply.
I thought that CheckDB locks down the databases so that no changes can be made to it whilst it is running?
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-02-02 : 06:41:59
Not by default. You can run it with the tablock option, which takes table locks, but that still doesn't prevent all changes. It's only when running checkDB with repair that the DB needs to be in single user mode.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -