4 Replies Latest reply on Sep 17, 2015 2:50 PM by tdavenport

    Days to Keep Inventory scans not purging records

    tdavenport Specialist

      I have an issue where the Inventory service is not purging records during it's nightly maintenance.


      Currently running 9.5 SP3.

      50K nodes managed

      Inventory service is running and has been restarted.

      Set Days to Keep inventory scans to 60 days. Restarted service.

      Old inventory was not purged after 5 days and multiple Inv. Service restarts.

      Maintenance occurs nightly at 9PM.

      I have a query focusing on Last Updated by Inventory Server with column set to show last date updated.

      I currently have 8953 devices that should have been purged.

       

      Any ideas on how to get this kick started? I cannot manually delete these records from the console without holding the console hostage for hours and hours. This might be part of the problem. If I tried to delete 1000 nodes, it would take at least a 1/2 day to complete. I know that there are hundreds of related records in other tables that are also deleted in this process. But I would expect at least some progress on these deletions even if maintenance doesn't fully complete it on a nightly basis.

       

      FYI -Event logs indicate that the maintenance service starts at 9pm and finishes in approximately 20 minutes. If I were to manually delete nearly 9K devices, there's no way that it could do it in 20 minutes.

       

      Question: Does DB maintenance purge devices in a more elegant (and efficient) manner than my manual deletion? If not, is this the culprit - that its just too many devices being purged at one time and thus it cannot be completed within the maintenance window? If so, what are my options?

       

      Any and all ideas are welcome!

       

      Thank you!Capture1.PNG

        • 1. Re: Days to Keep Inventory scans not purging records
          Apprentice

          Have you restarted the inventory service?  That should kick in maintenance...or at least it use to. 

          • 2. Re: Days to Keep Inventory scans not purging records
            Apprentice

            Or you could set "Perform maintenance at" 10:30am or something like that and should kick in

            • 3. Re: Days to Keep Inventory scans not purging records
              Apprentice

              How often to you reindex your DB?  Maybe run DBrepair.exe and clean up some junk. https://community.landesk.com/support/docs/DOC-4362

              • 4. Re: Days to Keep Inventory scans not purging records
                tdavenport Specialist

                So, I resolved my own problem. The problem was that there was one (1) device (the oldest device actually) that I could not delete via the console. I created a Query to show devices older than 60 days and sorted by oldest date first. I selected the first hundred or so and attempted to manually delete them. Sure enough, it failed! Wha? Upon looking at the devices in this group I noticed that the oldest one was a mobile phone - not a computer. I attempted to manually delete the phone via the console. Failed again. I then selected the next 100 devices and skipped the phone. Deleted them with no problem. So, I have a device record that prevented the deletion of old devices.

                 

                It turns out that someone had previously tested LANDESK MDM and added exactly 1 device. That phone. Evidently, they later uninstalled MDM before clearing out the MDM device records. My guess is that the device record is referencing tables and fields that no longer exist in LANDESK because the MDM tool was removed. In any case, I deleted the device via SQL and the problem was resolved. So, if you're deleting scan records older than X days and it suddenly stops working - and you know it's configured properly - Check your device records and see if you can manually delete them. If you can't, you have an orphaned device record that needs to be cleaned out via SQL (on the back end).