Export (0) Print
Expand All

How To Create a Custom Maintenance Task

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

You can create custom maintenance tasks that run valid SQL commands directly against the Configuration Manager 2007 site database.

Custom SQL commands are very powerful because they directly manipulate the Configuration Manager 2007 site database. Improper SQL commands can corrupt the Configuration Manager 2007 site database. You should secure the Configuration Manager 2007 site database by limiting the Manage SQL Commands Configuration Manager 2007 object security right to the appropriate administrators.

For more information about creating stored procedures, see How to: Create a Stored Procedure (SQL Server Management Studio) at http://go.microsoft.com/fwlink/?LinkId=73758.

To create a custom maintenance task

  1. In the Configuration Manager 2007 console, navigate to SQL Commands.
    In the Configuration Manager console, navigate to System CenterConfiguration Manager / Site Database / Site Management / <site name> / Site Settings / Site Maintenance / SQL Commands.

  2. Right-click SQL Commands, and select New SQL Command.

  3. In the New SQL Command Properties dialog box, enter a name and configure the task:

    • Specify a SQL command. You can specify a single SQL command up to 255 characters or the name of a stored procedure that contains multiple SQL commands.

    • Specify a path and log file name if you want to review the results after the SQL command runs.

    • Specify a schedule for the SQL command.

ImportantImportant
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.

See Also

For additional information, see Configuration Manager 2007 Information and Support.
To contact the documentation team, email SMSdocs@microsoft.com.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft