JAMF Ghost Record delete

1. After verifying the behavior above, log into MySQL as root: (Mac File Path)- /usr/local/mysql/bin/mysql -u root -p (Note: Password should be blank by default) 2. Next select the jamfsoftware Database: use jamfsoftware; 3. Next do a count on the computers table: a. OS X: select count(*) from computers; b. iOS: select count(*) from mobile_devices; 4. Next do a count on the computers_denormalized table: a. OS X: select count(*) from computers_denormalized; b. iOS: select count(*) from mobile_devices_denormalized; 5. Compare the counts and if the computers_denormalized/mobile_devices_denormalized count is not the same as the records count proceed to step 6, if it is, further troubleshooting is required to determine the root cause of your error. 6. If there is a ghost record(s) in the JSS, go into that record in the JSS and click on it, and take note of the id number(s) in the URL(s). 7. Verify that that ghost record(s) is/are actually in the denormalized table by looking in that table and comparing it against the computers/mobile_devices table, looking for the computer id(s) recorded in step 6 above: a. OS X: select computer_id, computer_name from computers_denormalized where computer_id not in (select computer_id from computers); i. select computer_id, computer_name from computers where computer_id not in (select computer_id from computers_denormalized); b. iOS: select mobile_device_id, display_name from mobile_devices_denormalized where mobile_device_id not in (select mobile_device_id from mobile_devices); i. select mobile_device_id, display_name from mobile_devices where mobile_device_id not in (select mobile_device_id from mobile_devices_denormalized); 8. Now we need verify that we have valid data in the _denormalized record so we can input it back into the computers/mobile_devices table. The most important being a valid udid or mac_address. 9. To verify the above we are going to run this command: a. OS X: select computer_id, udid, mac_address, alt_mac_address, computer_name from computers_denormalized where computer_id = ?; b. iOS: select mobile_device_id, udid, wifi_mac_address, bluetooth_mac_address, display_name from mobile_devices_denormalized where mobile_device_id = ?; 10. Next using the information from the denormalized table for this computer we are going to insert it back into the computers table: a. OS X: insert into computers (computer_id, udid, mac_address, alt_mac_address, computer_name) select computer_id, udid, mac_address, alt_mac_address, computer_name from computers_denormalized where computer_id = ?; b. iOS: insert into mobile_devices (mobile_device_id, udid, wifi_mac_address, bluetooth_mac_address, display_name) select mobile_device_id, udid, wifi_mac_address, bluetooth_mac_address, display_name from mobile_devices_denormalized where mobile_device_id = ?; 11. Next run the above count commands on both tables to verify they now have the same count.

Comments

Popular posts from this blog

Restore macOS Server from a Time Machine backup

JAMF Server Upgrade process

Creating a Custom Installer for Mac (PKG Package)