How do I configure the Qualys Import Utility to retrieve Compliance policy records for dates that were previously skipped?
The column PostureQueryRan in the table CompliancePolicy table in the QualysGuardDW database contains the watermark date provided for each Compliance posture request. To retrieve older posture data, update that column for each policy of interest by following this procedure:
SELECT Title, PolicyID FROM QualysGuardDW.dbo.CompliancePolicy;
USE QualysGuardDW;Replace
GO
UPDATE dbo.CompliancePolicy
SET PostureQueryRan = '<YYYY-MM-DD hh:mm:ss.mmm>'
WHERE PolicyID = <policy ID to update>;
GO
<YYYY-MM-DD hh:mm:ss.mmm> with an ISO-8601 timestamp representing the date and time you wish the importer to retrieve. Replace <policy ID to update> with the ID of the policy you wish to backdate. To set the policy date for multiple policies simultaneously, replace the = operator with an IN operator, as follows:
USE QualysGuardDW;
GO
UPDATE dbo.CompliancePolicy
SET PostureQueryRan = '<YYYY-MM-DD hh:mm:ss.mmm>'
WHERE PolicyID IN (<first policy ID>, <second policy ID>, <third policy ID>, <etc.>);
GO