cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ErikT
Lansweeper Tech Support
Lansweeper Tech Support

You are seeing duplicate entries in the software history report. 

What happened? 

In one of our earlier releases, an issue was discovered that created duplicate entries in the software history table. The issue was fixed in our 10.2.5.0 release. 

Now what?  

Automatic cleanup

After upgrading to version 10.2.5.0, the duplicate entries should be cleaned automatically by the Lansweeper cleanup options. However, this will take a while, and they are consuming unnecessary space in the Lansweeper database. 

Cleaning them instantly

The fastest solution to get rid of these duplicates is to run the below SQL script. 

  • First, backup your database before running any cleanup script. Do not skip this step.
  • Stop the Lansweeper scanning service and IIS Express services under services.msc.
  • If running multiple scanning services in a distributed Lansweeper setup, stop them all.
  • Open Program Files (x86)\Tools\DatabaseMaintenance.exe and run the script below via the Script Execution tab, paste the script into the top window and hit Execute.
WITH CTE AS(
   SELECT AssetID, softid, softwareVersion, Installdate, Lastchanged, Action, CurrentUser, msi, MsStore,
       RN = ROW_NUMBER()OVER(PARTITION BY installdate,assetid,softid,softwareVersion,Action ORDER BY softwareVersion)
   FROM tblSoftwareHist
)
delete FROM CTE WHERE RN > 1

 



Was this post helpful? Leave a Kudo!
Did you have a similar issue and a different solution? Share your work in the comments below and help your fellow IT Hero's!
More questions? Browse our  Quick Tech Solutions  or  Community Forum.


If you can't find what you're looking for, create a post in our Community Forum.



3 Comments
msullivan
Engaged Sweeper II

So as of the latest version 10.6.2.0, this is still not fixed. I have had to turn off software scanning history completely. Or would have to run the sql duplicate cleanup daily as it significantly bloats the database as well as just makes the software history unusable. Is there any idea when there will be a fix to this. basically, all the sw titles are removed and readded every scan on every device.

Obi_1_Cinobi
Lansweeper Tech Support
Lansweeper Tech Support

@msullivan 

Hello there!

We regret to inform you that this is a known issue with the current version of Lansweeper. However, our development team is wrapping up testing the fix on this issue, so this should be part of our upcoming release. We can't confirm an exact release date yet, but hang in there. It is coming!

Mister_Nobody
Honored Sweeper II

(128037 rows affected)

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now