Showing results for 
Show  only  | Search instead for 
Did you mean: 
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 release. 

Now what?  

Automatic cleanup

After upgrading to version, 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.
   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.


New to Lansweeper?

Try Lansweeper For Free

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

Try Now