Skip to content
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr

SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr

Written By Anoop C Nair
Last Updated June 24, 2024
Posted In SCCM
SHARE

Let’s use SQL queries to analyze SCCM Client Inactive Obsolete Status. I keep getting questions about ConfigMgr SQL queries in the HTMD forum.

If you have inactive SCCM clients, adjust the client status settings at the site level. These settings determine when to mark clients as inactive and can be configured to send alerts for low client activity. Afterwards, use the Configuration Manager console to monitor client health and activity.

According to Microsoft, a device is online when connected to its assigned management point and sends regular messages. The client is offline if the management point doesn’t receive notifications for five minutes. A client is active if it has communicated with Configuration Manager in the past seven days and inactive if it hasn’t requested a policy update, sent a heartbeat message, or sent hardware inventory in seven days.

I found a helpful SQL query for identifying ConfigMgr client status based on collections. This query can teach you how to use a CASE statement, declare SCCM collections, and inner join two ConfigMgr views in a SQL query. It’s a great way to learn important SQL query syntaxes that can be useful for working with ConfigMgr and understanding its data sources better.

Patch My PC
Index
SQL Query – SCCM Client InActive Obsolete Status
Results – SCCM Client InActive Obsolete Status
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr – Table 1

SQL QuerySCCM Client InActive Obsolete Status

Let’s find out the SCCM client’s Active, Inactive, and obsolete Status. The following steps will help you create a custom report to determine the status of the active, inactive, and obsolete Configuration Manager clients.

  • Open the SQL Management Studio.
  • Click on the New Query button.
  • Select the CM_MEM database from the drop-down menu.
    • MEM is the ConfigMgr site code.
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr - Fig.1
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr – Fig.1

Copy the following SQL query to find the client status.

  • Click on the Execute button.
Declare @Collection varchar(8)
Set @Collection = 'SMS00001'
select Distinct 
sys.name0 AS 'Device',
CASE WHEN sys.Client0 = 1 THEN 'YES' WHEN sys.Client0 = 0 THEN 'NO' ELSE 'NA' END AS 'ConfigMgr Client',
CASE WHEN sys.active0 = 1 THEN 'YES' WHEN sys.active0 = 0 THEN 'NO' ELSE 'NA' END AS 'Active Client',
CASE WHEN sys.Obsolete0 = 1 THEN 'YES' WHEN sys.Obsolete0 = 0 THEN 'NO' ELSE 'NA' END AS 'Obsolete Client'
from  v_r_system Sys
INNER Join v_FullCollectionMembership Col on Sys.ResourceID = Col.ResourceID
where Col.CollectionID = @Collection

Results – SCCM Client InActive Obsolete Status

Let’s see the results of the above client status SQL query:

DeviceConfigMgr ClientActive ClientObsolete Client
ADMEMCMNANANA
CMMEMCMNANANA
CMMEMCMTP01NANANA
PROD-WIN10TESTNANANA
PROD-WIN20YESYESNO
SQLMEMCMNANANA
TPCMMEMCMNANANA
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr – Table 1
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr - Fig.2
SCCM Client InActive Obsolete Status Using SQL Query | ConfigMgr – Fig.2

Resources

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His primary focus is Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

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

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read