SMS SQL Monitor Tasks

The Task Manager thread of the SMS SQL Monitor service component is responsible for monitoring the site control data and executing the scheduled tasks when they become due. This service component creates the following default tasks if they do not already exist:


Table 18.4 Default SMS SQL Monitor Tasks

TaskNotes
Backups:
Export SMS Site Database

Export SMS Site Database Transaction Log

Export Software Metering Database

Export Software Metering Transaction Log

These tasks are disabled by default. To activate exports, you must create a dump device and specify the period. When enabled, their default schedule is to run every Sunday between 12:00 midnight and 5:00 A.M.
Backup SMS Site ServerBacks up SMS site and software metering databases, the SMS and NAL registry keys, and the SMS directory structure to a network path. When enabled, the default schedule for this task is to run every Sunday between 12:00 midnight and 5:00 A.M.
Delete Aged Inventory HistoryThis task deletes historical data from the Inventory tables, given an “older than” parameter, in days. By default, it is scheduled to run every Saturday between 12:00 midnight and 5:00 A.M. and deletes data that is more than 90 days old.
Delete Aged Status MessagesThis task allows you to enable and schedule how long status messages are stored in the SMS site database before they are deleted. Use Status Filter Rules under Site Settings in the SMS Administrator console to configure which messages will be deleted. By default, this task runs daily between 12:00 midnight and 5:00 A.M.
Delete Aged Discovery DataThis task deletes discovery data that was discovered no earlier than an “older than” parameter, in days. By default, it is scheduled to run every Saturday between 12:00 midnight and 5:00 A.M. and deletes discovery data that was not discovered within the last 90 days.
Delete Aged Collected FilesThis task is similar to deleting history, although it only deletes files from the collected files group that are greater than 90 days old. The files are deleted from the Collected Files inbox. This task is scheduled to run every Saturday morning between 12:00 midnight and 5:00 A.M.
Monitor Keys and Recreate ViewsThis task verifies the integrity of the SMS site database keys and updates any SQL views that require updating.
Update StatisticsThis task is run against every table in the SMS site database and recalculates the table size to allow the SQL optimizer to most efficiently run a query. The default execution value is every two days between 12:00 midnight and 5 A.M. on every day but Sunday.
Rebuild IndexesThis task rebuilds SQL indexes for faster data retrieval. By default, this task is scheduled to run every Sunday morning between 12:00 midnight and 5 A.M.

You can schedule additional SQL Server commands; the results are written to a designated log file.

This flowchart documents the actions involved in these scheduled tasks. All of the actions take place on an SMS site database server.

Tracing Information

You can trace the activity described in this flowchart by studying the status messages for the server component listed in the table below. Or, you can enable the log file for this component. You can then study the log file and status messages associated with this server component to trace the activity that is actually occurring on your SMS system and compare it to the activity described in the flowchart. For more information about viewing status messages and enabling logging, see “Status Messages Versus Logging” in Chapter 16, “Introducing the SMS 2.0 Flowcharts.”


Table 18.5 Status Message Component and Log File for Site Component Manager:Site Configuration Change

Server componentLog file
SMS SQL MonitorSMS\Logs\SMSdbmon.log

Troubleshooting Tips

If scheduled tasks are not being executed:

SMS SQL Monitor: SMS SQL Monitor tasks flowchart