This article describes how to determine the actual number of managed devices if either the following license issue occours (see screenshot below) or if the number or Managed Devices in the Settings differs from the number of Managed Devices that can be found at Reports > Inventory > Managed Devices.
What to do in case one of these issues occurs?
For RayManageSoft, the license count is computed by grouping all installation records by computers. As long as this entry exist, even if the Managed Device does not exist anymore, it is still taken into account.
With an active RayManageSoft license, the following query can be used to get the current count of Managed Devices:
SELECT COUNT(*) as DeviceCount FROM (SELECT 1 as CNT FROM Installation with (nolock) GROUP BY ComputerID) C |
The following query can be used to get the names of the according Managed Devices ordered by date:
SELECT ComputerCN, InstallationDate FROM (SELECT ComputerID, Max(Received) AS InstallationDate FROM Installation with (nolock) GROUP BY ComputerID) GroupedInstallation Join Computer ON GroupedInstallation.ComputerID = Computer.ComputerID Order by InstallationDate |
For RayVentory, the license count is computed by grouping all inventory records by computers. As long as this entry exist, even if the Managed Device does not exist anymore, it is still taken into account.
With an active RayVentory license, the following query can be used to get the current count of Managed Devices:
SELECT COUNT(*) as DeviceCount FROM (SELECT 1 as CNT FROM InventoryReport with (nolock) WHERE HWDate is NOT NULL OR SWDate is NOT NULL GROUP BY ComputerID) C |
The following query can be used to get the names of the according Managed Devices ordered by date:
SELECT ComputerCN, CASE WHEN SWDate > HWDate THEN SWDate ELSE HWDate END AS InventoryDate FROM (SELECT ComputerID, SWDate, HWDate FROM InventoryReport with (nolock) WHERE HWDate is NOT NULL OR SWDate is NOT NULL) GroupedInstallation Join Computer ON GroupedInstallation.ComputerID = Computer.ComputerID Order by InventoryDate |
After these queries have been executed, use the information gathered and analyze the information with the following questions in mind:
- Is there a Managed Device which you think should not be included into the count?
- For what reason should the device be excluded?
- Had the device once been under management?
To remove a computer entry manually, use the following command line with the proper computer id:
exec DeleteComputer @ComputerID = ID |
Hint: Removing a computer entry will remove all report data connected with the entry. Hence, make sure to only delete entries which are not required and which have a database backup before starting with any manual changes in the database.
Comments