I have a Filter where the membership changes and does not reflect the 'truth': i.e. when I manually click 'Update Membership' it shows correctly but is not automatically updating correctly, even when directly linked in to the target of a Policy. This is quite a long one, apologies in advance.
For a Filter used for extended piloting, I wanted to it to dynamically contain 7% (plus one to ensure no zero returns) of the managed Windows computers that had checked in to the Altiris server within the last 7 days, ordered by GUID so that the sample was initially random but would be fairly static for regularly connecting computers.
Using a combination of copy / paste, Googling and a dash of imagination, I came up with the following SQL which I used in NS6 with great success (if it's not clear from the below, I am at best a beginner novice at SQL):
SELECT TOP (CONVERT(int, ROUND((SELECT COUNT(guid) FROM vComputer vc
join resourceupdatesummary rus
on vc.guid = rus.resourceguid
AND rus.inventoryclassguid = 'C74002B6-C7B9-47BB-A5D6-3031AF73BB8D'
WHERE vc.domain = 'CONNECT' and Datediff(dd,rus.[modifieddate],Getdate()) <= 7) * 0.07, 0)) + 1) guid FROM vComputer vc
join resourceupdatesummary rus
on vc.guid = rus.resourceguid
AND rus.inventoryclassguid = 'C74002B6-C7B9-47BB-A5D6-3031AF73BB8D'
WHERE vc.domain = 'CONNECT' and Datediff(dd,rus.[modifieddate],Getdate()) <= 7
ORDER by guid
So when we installed Altiris 7.1 (and now upgraded to 7.5) to migrate our new Windows 7 computers to, I used the same code since the GUID in the database for the inventoryclassguid is the same as NS6.
Initially it looked like the code was working perfectly: in our test environment we have 45 domain computers in the 'CONNECT' domain and the SQL was returning 3 computers as I would expect, since some of that 45 have not connected in the last 7 days.
But... after a few hours the Filter showed 5 or 6 or 8 members. I reset the Filter again yesterday and I did not refresh it manually (by clicking 'Update Membership') at all, and this morning it then contained 18 members! I've just clicked the 'Update Membership' button and the membership has again reverted to 3.
Over the past few weeks the behaviour is consistent in that the Filter never contains the correct number until I click 'Update Membership' and the number it does contain varies up and down, but always too high, within hours after I do click 'Update Membership'.
I am hoping that this behaviour makes sense to someone and / or a workaround or SQL fix can make it behave.
Kind regards,
Darren.
NB. the reason 7% was chosen is because we have an estate of about 2,500 managed computers and this means that normally the NS6 collection contains around 100 computers that have checked in the last 7 days, which is a nice extended pilot number.