Valid SQL commands can be used to create custom maintenance tasks which run directly against the Configuration Manager 2007 site database.

Custom maintenance tasks can be created by entering either a single SQL command or the name of an existing SQL stored procedure that contains multiple SQL commands.

Important
SQL commands are not validated by Configuration Manager 2007 for syntax. Before you schedule a custom maintenance task, ensure that the SQL command is valid by testing it in SQL Server Management Studio.
Name

Specifies the name of the selected command. You must enter the command exactly as you want it to be passed to SQL Server (no syntax checking is performed). For example, to run the stored procedure that displays the overall space usage of the database, enter sp_spaceused.
Enable SQL Command

Enables the selected command. You must enable the command to schedule it.
SQL command

Enables you to type in the SQL command you want to run.
Note
To move to the next line when entering SQL commands, press CTRL+ENTER.
Log status to

Specifies the logging file and path for status generated when the command is run. The path can be any valid network path (for example, \\<myserver>\logs\command1.log). The logs can be viewed with any basic text editor, such as Notepad.
Note
If you do not supply the log path, status will not be logged for the command.
Schedule

Specifies the schedule to run the selected task.
Start after

Specifies the earliest time that the selected task can begin.
Latest start time

Specifies the latest time that the selected task can begin.
Monday through Sunday

Specifies the days to run the task. You can specify each day independently. For example, you could schedule a task to run only on Sunday, or on Monday, Wednesday, and Friday.

See Also