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.