You can create custom maintenance tasks that run valid SQL commands directly against the Configuration Manager 2007 site database.
You can specify a single SQL command up to 255 characters long or the name of an existing stored procedure. For example, you can use the following SQL commands to create helpful custom maintenance tasks:
- The SQL Server 2005 DBCC CHECKDB (Database
Consistency Check) stored procedure can be used to check the
logical and physical integrity of all the objects in the site
database. The DBCC CHECKDB stored procedure, performs the following
operations:
- Runs DBCC CHECKALLOC on the database.
- Runs DBCC CHECKTABLE on every table and view
in the database.
- Runs DBCC CHECKCATALOG on the database.
- Validates the contents of every indexed view
in the database.
- Validates the Service Broker data in the
database.
- Runs DBCC CHECKALLOC on the database.
- The SQL xp_sqlmaint command runs database
maintenance tasks.
- The SQL sp_who command determines the number
of SQL Server connections currently in use by Microsoft System
Center Configuration Manager 2007, or by any other process.
- The SQL sp_spaceused command displays the
number of rows, disk space reserved, and disk space used by a table
in the current database, or displays the disk space reserved and
used by the entire database.
- The SQL sp_monitor command displays SQL
Server activities and statistics.