I have been fighting with Symantec Altiris Software Delivery Solution licenses for some time now. I have had numerous support calls trying to get Altiris to assist me in tracking down where each of these licenses has went. Today I found what I was looking for after Symantec Altiris support was unable to help me. I was actually told that they would not help me find a list of machines that were taking up licenses. I was pretty unhappy about this and will reconsider my options going forward. I did submit a feature request to them. I just want to be able to prove that each license is being used up by a machine that I approve. In SWD 7.0 they are changing the license model to be based on agent installation. The current version I am using is 6.0 SP3.
Here is a SQL statement I captured using sql profiler that they execute to generate the number of in use Software Delivery Licenses.
exec sp_executesql N'SELECT COUNT(DISTINCT Stat.WrkstaId) FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'
It is counting unique workstation id’s. I change this to look at workstation names and disable the counting. Please keep in mind that this may actually cause you to generate a different number of machines as two machines may have ended up with the same name. For what I was doing this was ok.
Here is the sql statement for a list of machines.
exec sp_executesql N'SELECT Distinct Wr.Name FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'
Finnaly if you would like to list out all of the fields that are pulled use the following statement.
exec sp_executesql N'SELECT * FROM AeXEvt_AeX_SWD_Status as Stat, SWDAdvertisement as Advert, SWDOriginator as Orig, SWDProgram as Prog, vItem vI, Wrksta Wr WHERE Stat.AdvertisementId = Advert.AdvertisementId AND Stat.AdvertisementId = vI.Guid AND ( vI.ClassGuid = ''5B91F0BF-899F-49E2-B8E1-67219100BBFA'' OR vI.ClassGuid=''2D39BA40-2A60-42EE-92E0-C11AD2245969'') AND vI.ProductGuid = ''AD3F5980-D9E9-11D3-A318-0008C7A09198'' AND LOWER(Prog.ProgramId) = LOWER(Advert.ProgramId) AND LOWER(Prog.CommandLine) NOT Like ''aexinvsoln.exe%'' AND Orig.OriginatorId = Advert.[_OriginatorId] AND Advert.[_Latest] =1 AND Orig.Type != ''NSInternal'' AND ( Stat.EventType=''New Job'' OR Stat.EventType=''Package To Be Removed'' OR Stat.EventType=''Job Removed'' OR Stat.EventType = ''Job Updated'') AND Stat.WrkstaId = Wr.WrkstaId AND (Wr.SystemType = ''Win32'' OR Wr.SystemType = ''Win64'')',N'@ProductGuid uniqueidentifier',@ProductGuid='AD3F5980-D9E9-11D3-A318-0008C7A09198'
Now I’m off to clean up my Altiris SWD.







August 2nd, 2011 at 2:32 pm
What can i actually do with these results to free up licenses?
August 2nd, 2011 at 6:41 pm
I used the result to determine if I had aging machines that had been taken off of the network but still existed in Altiris. You can mark old machines as retired or you can delete them from Altiris. This query is derived from the query used to show the license count when you click on licenses on the configuration tab in 6.0.