Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

585


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 fi nd 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.
c22.indd 585c22.indd 585 7/31/2012 9:24:27 AM7/31/2012 9:24:27 AM
http://www.it-ebooks.info

Free download pdf