From the course: SQL Server 2016: Administer a Database Infrastructure

Unlock the full course today

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

Implement database consistency checks

Implement database consistency checks - SQL Server Tutorial

From the course: SQL Server 2016: Administer a Database Infrastructure

Start my 1-month free trial

Implement database consistency checks

- [Narrator] SQL server has a number of built-in commands that will check the structure of your databases, and provide information that could be useful when troubleshooting problems. Collectively, they're called database console commands, or DBCC commands. On this page of the documentation, you can find links of the four categories of commands over here on the right, including informational, validation, maintenance, and miscellaneous statements. On the left, are quick links to each of the pages describing the features and functions of each command, and as you can see, there are quite a lot of them. When it comes to checking for corruption, there are a few that stand out, as the ones that should definitely be in your toolbox. The most comprehensive of all is check DB. Let's go ahead and see how to use it. First, I'm going to switch into the WideWorldImporters database. To run the console command, you just use the letters, DBCC, followed by the command. In this case, check DB. Let's go…

Contents