Tag: DBCC

DBCC CloneDatabase

The Service Pack 2 release of SQL Server 2014 introduces a new DBCC command called DBCC CloneDatabase. Books online states: “DBCC CLONEDATABASE should be used to create a schema and statistics only copy of a production database in order to

Posted in SQL 2014 Tagged with: ,

Database Corruption Challenge #9 – How I Corrupted the Database.

I was asked how I caused the corruption in Database Corruption Challenge #9. Here is how I did it. To cause the corruption, I used the undocumented DBCC WritePage, however the same thing could have been accomplished by detaching the

Posted in Corruption Tagged with: , , ,

Corruption Challenge 1 – how I corrupted the database

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

Posted in Corruption Tagged with: , , , , , , ,

A Weekend Full of Database Corruption

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

Posted in Corruption Tagged with: , ,

Introducing the DataBase Corruption Challenge (DBCC) – Week 1 Challenge

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

Posted in Corruption, SQL 2014 Tagged with: , , , , , , ,

SQL Sunday Fun – Word Search with SQL Server DBCC Commands

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

Posted in DBCC Commands, SQL Sunday, TSQL Tagged with: , , , , , ,

End of DBCC Command Month

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

Posted in DBCC Commands Tagged with: , ,

DBCC ShrinkDatabase

Being day 24 of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC SHRINKDATABASE. When I first heard about DBCC Shrink Database (many years ago), I immediately thought “what a great feature, run this every night when

Posted in DBCC Commands Tagged with: , , , , , , , , , , , , ,

DBCC OutputBuffer

Being day 22 of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC OUTPUTBUFFER. I missed a few days on the DBCC Commands due to attending SQL Saturday in Redmond, and the release of my book on

Posted in DBCC Commands Tagged with: , , , , , ,

DBCC Help

Being day 15 of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC HELP. Description: DBCC HELP is used get more information about a specific DBCC Command. DBCC HELP Syntax: Example: The following example calls DBCC Help

Posted in DBCC Commands Tagged with: