sp_dbcc.sql

September 19, 2001



This script runs dbcc checkdb, dbcc checkalloc, and dbcc check catalog on all databases on the server. The script runs against the sysdatabases table in master. The script is also dynamic so the stored procedures can reside on any database and run effectively. Furthermore since it is in a stored procedure it can be easily executed within a job.

This is a very safe and viable stored procedure and is a great building block for adding on new functionality. For example you could add a disk or tape backup for each database within the script. This script can be run in versions 7 and 2000 of Sql Server.

Author: Walter Hickman


Download Script:
sp_dbcc.sql


Disclaimer: We hope that the information on these script pages is valuable to you. Your use of the information contained in these pages, however, is at your sole risk. All information on these pages is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, or fitness for a particular purpose... Disclaimer Continued


Back to Database Journal Home








The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers