Show the deployment status summary for an application or package
SQL query for the Configuration Manager database that shows success, in progress, error and unknown counts for each deployment of an application or package.
LanguageSQL
What it does to the systemReads only. It changes nothing.
The Deployments node in the console shows one deployment at a time. This query shows every deployment of an application or package in one table.
The result shows each deployment with its target collection and the counts for success, in progress, error, other and unknown.
SQL
-- Type part of the application or package name. Keep the % signs.
DECLARE @SoftwareName NVARCHAR(255) = '%7-Zip%';
SELECT
ds.SoftwareName AS Software,
ds.CollectionName AS TargetCollection,
CASE ds.FeatureType
WHEN 1 THEN 'Application'
WHEN 2 THEN 'Package and program'
END AS DeploymentType,
CASE ds.DeploymentIntent
WHEN 1 THEN 'Required'
WHEN 2 THEN 'Available'
END AS Purpose,
ds.DeploymentTime AS DeploymentTime,
ds.NumberTotal AS Total,
ds.NumberSuccess AS Success,
ds.NumberInProgress AS InProgress,
ds.NumberErrors AS Errors,
ds.NumberOther AS Other,
ds.NumberUnknown AS Unknown
FROM v_DeploymentSummary ds
WHERE ds.SoftwareName LIKE @SoftwareName
AND ds.FeatureType IN (1, 2) -- 1 = application, 2 = package and program
ORDER BY ds.SoftwareName, ds.CollectionName;
How to use it
- Open SQL Server Management Studio and connect to the site database.
- Paste the query into a new query window.
- Change
@SoftwareNameto part of the name of your application or package. - Run the query.
- Compare the Success column with the Total column for each collection.
Good to know
- The counts are a summary that the site updates on a schedule. They can lag behind the live state.
- To see task sequences, add 7 to the FeatureType list. To see software updates, add 5.
- An available deployment shows low numbers until users install the software.
deployment status
application deployment
v_DeploymentSummary
More SCCM SQL queries
Check BitLocker protection status for each computer
Check distribution point content status for a package
Check software update compliance for one update
Count computers by manufacturer and model
Count Configuration Manager client versions in your environment
Count installs per application and version