Chapter 22

Maintaining the Database

In This Chapter

Using SQL Server's Database Console Commands (DBCC)

Creating Database Maintenance Plans

The previous chapter covered database recovery planning. This chapter explores various database maintenance tasks that need to be regularly performed, such as database backups, database integrity checks, and index maintenance. This chapter discusses database maintenance using Transact-SQL Database Console Commands (DBCC) and Maintenance Plans.

What's New in SQL Server Database Maintenance?
In earlier versions of SQL Server, DBCC stood for Database Consistency Checker— it has since been renamed Database Console Commands. The following deprecated DBCC commands are still in SQL Server 2012, but they will be removed in a future version of SQL Server. It is recommended to stop using the deprecated DBCC commands for new development work and plan to change existing applications using these commands.
  • DBCC DBREINDEX
  • DBCC INDEXDEFRAG
  • DBCC SHOWCONTIG
  • DBCC PINTABLE
  • DBCC UNPINTABL
Although DBCC PINTABLE and DBCC UNPINTABLE commands are still in SQL Server 2012, they have no effect on SQL Server.
You can find a complete list of deprecated (outdated or no longer accessible) DBCC commands in Chapter 1, “The World of SQL Server,” in Books Online, and at http://msdn.microsoft.com/en-US/library/ms143729(v=SQL.110).aspx.

Get Microsoft SQL Server 2012 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.