How to Clear Pending and Failed Commands in Jamf Pro 10 via MySQL
Jamf Pro is a powerful MDM tool. The larger your scale, the more you benefit from developing maintenance routines including clearing pending and failed commands. Even though these features are built into JamfPro’s GUI, I still like to execute the queries in MySQL to get feedback on how many commands and/or rows are affected. The path to execute these commands is intentionally left out. If you are unsure where to go, then you probably need to contact support for guidance before proceeding. Also, be sure to have a current backup saved before doing any commands directly in your database. This isn’t something you want to yolo.
View and clear pending commands:
Before clearing or viewing, select the database: use jamfsoftware;
To view Pending:
select count(*) from mobile_device_management_commands where apns_result_status !=’Acknowledged’;
To clear Pending codes:
delete from mobile_device_management_commands where apns_result_status !=’Acknowledged’;
View and clear failed commands:
To view Failed commands:
select count(*) from mobile_device_management_commands where apns_result_status !=’Error’;
To clear Failed codes:
delete from mobile_device_management_commands where apns_result_status !=’Error’;
MySQL 5.7 Reference Manual Tutorials
To learn about using common queries in MySQL, check out the handy tutorial in the MySQL 5.7 Reference Manual.(click here)
This chapter provides a tutorial introduction to MySQL by showing how to use the mysql client program to create and use a simple database. mysql (sometimes referred to as the “terminal monitor” or just “monitor”) is an interactive program that enables you to connect to a MySQL server, run queries, and view the results.
Featured image obtained from Google: https://goo.gl/images/Ba1wJ6
Additional Jamf Pro related articles you might find interesting include:
Starting and Stopping Tomcat in macOS and Linux for Jamf Pro Server
Increase Tomcat Memory for Clustered Jamf Pro Web Apps in Linux
tvOS and iOS Restrictions Allowed by Apple for MDM