Being day nine of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC DBREINDEX. Microsoft recommends avoiding the use of DBCC DBREINDEX. DBCC DBReIndex has been deprecated  meaning that Microsoft has announced that DBCC DBReIndex will be going away in future versions of SQL Server Over time as you insert, update and delete from tables various clustered and …

DBCC DBReIndex Read more »

Being day eight of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CLEANTABLE. Many times I have worked on a database that has evolved over 10 or more years of changes from different developers and DBAs. One of the signs I see in databases like this is the waste associated with obsolete columns.  For instance someone …

DBCC CleanTable 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 six of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKIDENT. Description: DBCC CHECKIDENT is used for check on the current value in the identity column for a table.  It also reports on the largest value in that column. DBCC CheckIdent can also be used to update or set the next identity value on …

DBCC CheckIdent Read more »

Being day five of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKFILEGROUP. Description: DBCC CHECKFILEGROUP is used for a specific filegroup to check the disk allocation and structural integrity of all tables and indexed views. DBCC CHECKFILEGROUP Syntax: filegroup_name – The name of the filegroup to be checked. Ddefault (or if 0 is specified) = …

DBCC CheckFilegroup Read more »

Being day four of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKDB. For more info on DBCC see the Database Corruption Challenge. DBCC CheckDB Description: DBCC CHECKDB is used to check the physical integrity of the entire database. DBCC CHECKDB is used to detect corruption in the database, and should be run regularly.  This is …

DBCC CheckDB for Database Consistency Read more »

Being day three of the DBCC Command month at SteveStedman.com, today’s featured DBCC Command is DBCC CHECKCONSTRAINTS. Description: DBCC CHECKCONSTRAINTS is used to check the integrity of one constraint, all constraints for a table, or all constraints for a database. DBCC CHECKCONSTRAINTS Syntax: Example: To check constraints for an a single table: For instance to check the constraints on the …

DBCC CheckConstraints 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 »

For the entire month of may, I will be featuring one DBCC Command each day on my blog. Come back for your daily dose of DBCC commands. Tomorrow (May 1st) I will cover DBCC CheckAlloc, followed by 30 more days of DBCC commands. First off, what is a SQL Server DBCC command? DBCC stands for Database Console Commands, and the commands …

May is DBCC Command Month at SteveStedman.com Read more »