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:

See Also