SQL Query to Monitor Collection Evaluation in SCCM

Using SQL Query to Monitor Collection Evaluation in SCCM

Last Updated

June 23, 2026

Posted In

In this post, I will show you how you can use a simple SQL query to monitor collection evaluation in SCCM. Ideally, Microsoft provides the CEViewer tool for viewing and troubleshooting the collection evaluation process, but a SQL query is a faster and more efficient way to obtain the same information.

During an audit of a ConfigMgr environment last week, I observed that certain device collections were updating very sluggishly. These were massive collections with over 800 devices. In large organizations, it’s common to see refresh intervals set too high for some collections, forcing administrators to wait longer for updates to finish.

One way to get around this is to keep an eye on the collection evaluation procedure and spot any performance problems that may arise from slow evaluations or large collections. A SQL query can be used for this, and I believe the advantage is that it is much more accurate and faster. I’ve tested this query multiple times, and it functions flawlessly.

Install and Update Third Party Applications with Patch My PC
Install and Update Third Party Applications with Patch My PC

Monitor Collection Evaluation using SQL Query

Launch the SQL Server Management Studio (SSMS) and connect to the database engine. Expand Databases, and right-click Configuration Manager database, and select New Query. In the query window, paste and execute the below query to monitor collection evaluation.

SELECT 
    coll.CollectionID,
    coll.Name AS CollectionName,
    coll.LastRefreshTime,
    coll.LastMemberChangeTime,
    coll.LastChangeTime
FROM 
    v_Collection coll
WHERE 
    coll.LastRefreshTime IS NOT NULL
ORDER BY 
    coll.LastRefreshTime DESC;

Numerous details are visible in the query output, including:

  • Collection ID
  • Collection Name
  • Last Refresh Time
  • Last Member Change Time
  • Last Change Time

From the above fields, the most important one to look for is the Last Refresh Time of the collection.

SQL Query to Monitor Collection Evaluation in SCCM
SQL Query to Monitor Collection Evaluation in SCCM

I’ve included a second query below that can evaluate every collection in your configuration and yield extra information like the evaluation start time and the number of members in each individual collection. I hope the below query helps.

SELECT 
    coll.CollectionID,
    coll.Name AS CollectionName,
    coll.LastRefreshTime,
    coll.LastMemberChangeTime,
    coll.LastChangeTime,
	  coll.MemberCount,
	  coll.EvaluationStartTime
FROM 
    v_Collection coll
WHERE 
    coll.LastRefreshTime IS NOT NULL
ORDER BY 
    coll.LastRefreshTime DESC;
SQL Query to Monitor Collection Evaluation in SCCM
SQL Query to Monitor Collection Evaluation in SCCM

Further Reading

Check out some other useful SQL queries for Configuration Manager.

Leave a Reply

Your email address will not be published. Required fields are marked *

Prajwal Desai

Prajwal Desai is a highly accomplished technology expert and an 11-time Dual Microsoft MVP (Most Valuable Professional), specializing in Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. As a renowned author, speaker, and community leader, he is widely recognized for sharing his in-depth expertise and insights through his blog, YouTube channel, conferences, webinars, and other platforms.