Since the corruption challenge completed yesterday, I have had several request asking how I created the corrupt database. So here is the script that I used to create the Database Corruption Challenge 1. First the initial setup. Most of this I stole from a query training session that I did several weeks ago. All I really needed was a table …

Corruption Challenge 1 – how I corrupted the database Read more »

On Saturday morning, I announced the Database Corruption Challenge, and I had to abbreviate it as the DBCC, why not, acronym overloading isn’t always a bad thing. There were 91 participants, 22 of which ended up with correct answers with no corruption and no data loss. I created a database, with 3 bytes of corruption in one of the leaf …

A Weekend Full of Database Corruption Read more »

Welcome to the DataBase Corruption Challenge, this is an about weekly blog challenge where I will post a corrupt SQL Server database with some details on what happened to it. If at this point you are already a bit irked by my use of capitalization in the DataBase Corruption Challenge, and the acronym of DBCC that I have used to …

Introducing the DataBase Corruption Challenge (DBCC) – Week 1 Challenge Read more »

The following DBCC commands are all hidden in the word search.  Be aware, some of the DBCC commands are undocumented. CACHESTATS CHECKCATALOG CHECKCONSTRAINTS CHECKDB CHECKFILEGROUP CHECKIDENT CLEANTABLE DROPCLEANBUFFERS FLUSHPROCINDB FREE FREEPROCCACHE FREESESSIONCACHE FREESYSTEMCACHE INDEXDEFRAG OPENTRAN OUTPUTBUFFER PAGE PROCCACHE SHOWCONTIG SHRINKDATABASE TRACEON TRACESTATUS UNPINTABLE UPDATEUSAGE USEROPTIONS END OF PUZZLE ————————- See also: For more information on DBCC Commands: DBCC CheckAlloc DBCC …

SQL Sunday Fun – Word Search with SQL Server DBCC Commands Read more »

As the month of May comes to an end so does DBCC command month at SteveStedman.com. I didn’t cover all the DBCC Commands this month, but here is what I did have time to cover: May 1st – DBCC CheckAlloc May 2nd – DBCC CheckCatalog May 3rd – DBCC CheckConstraints May 4th – DBCC CheckDB May 5th – DBCC CheckFilegroup May 6th – DBCC CheckIdent May …

End of DBCC Command Month Read more »

Being day seven of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKTABLE. Description: DBCC CheckTable is used to check the structure of a table to verify the integrity of every data page associated with that table, and all of the indexes associated with that table. If you have used DBCC CheckDB, and a problem has …

DBCC CheckTable Read more »

Being day two of DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKCATALOG. Description: DBCC CheckCatalog checks the catalog integrity for a given database. DBCC CheckCatalog is less intensive than DBCC CheckDB, as CheckCatalog checks that every data type in syscolumns has a matching entry in systypes and that every table and view in sysobjects has at …

DBCC CheckCatalog Read more »

Being day one of DBBC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKALLOC. Description: DBCC CheckAlloc checks and can repair disk space allocation structures for a database. DBCC CheckAlloc checks the allocation for all pages in the database compared to their internal structures representing those pages. When you run DBCC CheckDB it internally runs the equivalent of DBCC …

DBCC CheckAlloc Read more »