From the course: Microsoft SQL Server 2022 Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Database Console Commands (DBCC)

Database Console Commands (DBCC)

- [Instructor] 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. There are four categories of commands, maintenance miscellaneous, informational, and validation. If you scroll down on this page you'll find each category broken down with links to the documentation on the individual DBCC commands. Now, when it comes to monitoring your database and looking for potential corruption in the files, there is one of these commands that stands out as the most important and it should definitely be in your toolbox. It's a validation statement and it's called CheckDB. Let's see how to use it. I'm going to run DBCC CheckDB on line number eight but I also want to make sure I'm targeting the Wide World Importers database. So let me highlight lines…

Contents