Environment
NetIQ AppManager 6.x
NetIQ AppManager 7.0.x
Situation
Resolution
Use the following SQL statement in SQL Query Analyzer to collect a raw count of data points that are older than a specified number of days. The default is 8, but to increase the increment change the assigned value for @Days in the statement below.
--the following statement will report on the ArchiveData table
declare @Days int
Select @Days = 8
select count(*) from ArchiveData where time < (datediff(s,'1/1/1970',GETUTCDATE())-(@Days*86400))
-- the following statement will report on the Data table:declare @Days int
Select @Days = 8
select count(*) from Data where time < (datediff(s,'1/1/1970',GETUTCDATE())-(@Days*86400))
Additional Information
These query statements are helpful in troubleshooting problems with the PurgeData SQL job, which maintains the number of rows in the Data table, and the Aggregation of the ArchiveData table.