From the course: SQL Server 2014 Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Using DBCC

Using DBCC - SQL Server Tutorial

From the course: SQL Server 2014 Essential Training

Start my 1-month free trial

Using DBCC

- Now I'd like to talk about another tool for monitoring SQL Server 2014. And that is the database consistency checker. Which is abbreviated as D-B-C-C. DBCC allows us to verify the integrity of different objects inside of our database. So I'm going to open up a new query, and I'll type in DBCC space CHECKTABLE and then in parenthesis and in single quotes, I'll need to give it the name of a table, so DBCC CHECKTABLE ('HumanResources.Employee'). This will run a consistency check on this table. Making sure that all of the data in all of the columns is the right data types. Making sure that all of the records are complete records. Making sure that any relationship from this table to another table, does in fact point to records that exist. And making sure that the meta data in the dynamic management views is correct. So I'll execute this and when we run it against just one table, it usually runs fairly quickly. And it comes back with results saying there are 290 rows in 7 pages. DBCC…

Contents