DBCC


T-SQL provides DBCC statements that act as Database Console Commands for SQL Server 2005. These statements check the physical and logical consistency of a database. The DBCC statements can fix detected problems. They are grouped into the categories listed in Table 18–6.

Table 18–6: The DBCC Statement Categories

Statement Category

Process

Maintenance statements

Maintenance tasks on a database, index, or filegroup.

Miscellaneous statements

Miscellaneous tasks such as enabling row-level locking or removing a dynamic-link library (DLL) from memory.

Status statements

Status checks.

Validation statements

Validation operations on a database, table, index, catalog, filegroup, system tables, or allocation of database pages.

The DBCC statements take input parameters and return values. All DBCC statement parameters can accept both Unicode and DBCS (double-byte character set) literals. Many DBCC commands can produce output in tabular form using the WITH TABLERESULTS option. This information can be loaded into a table for further use. The DBCC commands are fully covered in the Books Online, and based on the vastness of the documentation, it would be redundant to cover them in this book. As a shortcut, however, Appendix provides a brief explanation of each command.




Microsoft SQL Server 2005. The Complete Reference
Microsoft SQL Server 2005: The Complete Reference: Full Coverage of all New and Improved Features
ISBN: 0072261528
EAN: 2147483647
Year: 2006
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net