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

We have recently discovered that for tblServicesUni, entries are not being cleaned up if an asset gets deleted. This table could potentially build up over time, increasing database size and impacting performance.

Symptoms:

You see an extensive database.  You have performed the database manual cleanup. The database remains relatively large even after running the manual database clean-up steps. 

Diagnosis:

Navigate to Configuration\Database tables and check the size of tblServiceUni. If these are considerately larger than the other database tables, proceed with the provided solution.

Solution:

You can already remove unlinked rows in tblServicesUni. This will delete all redundant service data that is no longer linked to an asset. 

  • Create a backup of your database just to be safe! Do not skip this step.
  • Open SQL Server Management Studio on your database server and connect to your lansweeperdb
  • Open a new Query Window and copy/paste the script below. 
  • Run the script.

 

USE lansweeperdb
DELETE FROM tblServicesUni 
WHERE ServiceuniqueID NOT IN (SELECT serviceuniqueid FROM tblservices)

 

Final note:

tblServciesUni should be cleaned up whenever an asset is deleted from the database.  We are working on getting this fixed for you.

Our apologies for the inconvenience this causes once solved a solution will be referenced as LAN-8833 on our changelog



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