The other day I got a call saying that a users database was corrupt and I needed to look at it. They said that DBCC CheckDB was failing. So of course I made sure we had backups and then logged in to take a look. Below is the error that was found.
/* Style Definitions */
mso-padding-alt:0in 5.4pt 0in 5.4pt;
font-family:”Times New Roman”,”serif”;}
Extent (1:11478864) in database ID 7 is marked allocated in the GAM, but no SGAM or IAM has allocated it. Extent (1:11478872) in database ID 7 is marked allocated in the GAM, but no SGAM or IAM has allocated it. Incorrect PFS free space information for page (1:11478795) in object ID 1733581214, index ID 1, partition ID 72057596405219328, alloc unit ID 72057594049986560 (type LOB data). Expected value 80_PCT_FULL, actual value 95_PCT_FULL. CHECKDB found 2 allocation errors and 0 consistency errors not associated with any single object.
After doing some searching I found that this is just a problem with the GAM that has a bit set that did not need to be since I did not have an index that it was referring to. More infor here. http://technet.microsoft.com/en-us/library/aa275767%28SQL.80%29.aspx
So I took a backup of the database and did a restore to a different DB name. I ran a DBCC CheckDB Restore_with_Data_Loss and I was able to get the database to run a DBCC with no errors and had the users validate that we did not infact lose any data. All is well with the world.