Home > ConfigMgr (SCCM) > Reporting of "Maintenance Tasks" status of SCCM primary server

Reporting of "Maintenance Tasks" status of SCCM primary server

Many times we need to know the status of maintenance tasks running on SCCM primary servers as part of troubleshooting. To maintain, a healthy SCCM environment the maintenance tasks are very important.

Completion Status 0 means the task finished successfully. There is a table called SQLTaskStatus which holds this data. We can also add a column to find the time a task took to run. The query for the same would be:

select *,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600) as Hours,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/3600)*60 as Minutes,
floor(DATEDIFF(ss,laststarttime,lastcompletiontime))- floor(DATEDIFF(ss,laststarttime,lastcompletiontime)/60)*60 as TotalSeconds
from SQLTaskStatus

Output of the Query is given below:

Origin of the Query

About these ads
Categories: ConfigMgr (SCCM)
  1. No comments yet.
  1. August 12, 2011 at 12:32 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 1,037 other followers

%d bloggers like this: