![TL;DR-Sweepy-Icon (1).png TL;DR-Sweepy-Icon (1).png](/t5/image/serverpage/image-id/3025i57CF8C0177E81069/image-dimensions/70x70?v=v2)
This page explains how you can quickly reduce your Lansweeper database size to avoid any impact on your sync with Cloud.
As both SQL LocalDB and SQL Server Express databases are limited in capacity by Microsoft to 10 GB, it is important to keep an eye on the size of your Lansweeper database, to prevent it from reaching its maximum size.
When the database is full or almost full, your Lansweeper server might stop functioning as it should, resulting in incomplete or out of date data. If your on-prem installation is linked to Cloud this may result in this same incomplete or out of date data being synced to Cloud, or your sync stopping altogether.
Additionally, if your database reaches its size limit during a Lansweeper update, the update may fail.
When the database reaches the size limit of 90% a notification will be shown in the on-prem web console.
![ADP-notifications-1.jpg ADP-notifications-1.jpg](https://community.lansweeper.com/t5/image/serverpage/image-id/1955i13DDB689FCE3622F/image-dimensions/675x225?v=v2)
This notification will only be shown to users that have the Access Configuration permission. The notification can be dismissed, and it will automatically disappear if the database size issue is resolved.
The current size of your database is listed in the Scanning Status widget or sync status section of the Configuration > Link With Cloud Site menu.
![ADP-notifications-2.jpg ADP-notifications-2.jpg](https://community.lansweeper.com/t5/image/serverpage/image-id/1956i560C62FBB7215884/image-dimensions/675x225?v=v2)
Reduce your database size
- Determine which database server is hosting your Lansweeper database by using the ConfigEditor tool. You can follow the instructions in this knowledge base article.
- Stop the Lansweeper Server and web server service in Windows Services on all of your scanning servers. Keep in mind that this will log everyone out of the console. Your webserver service is either IIS Express or World Wide Web Publishing Service (IIS).
![procedure-stopping-the-lansweeper-service.jpg procedure-stopping-the-lansweeper-service.jpg](https://community.lansweeper.com/t5/image/serverpage/image-id/921i01D324ECBAE5CC7B/image-size/large?v=v2&px=999)
- Run the DatabaseMaintenance tool on your Lansweeper server. The tool can be found at
Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe
.
![menu-databasemaintenance.jpg menu-databasemaintenance.jpg](https://community.lansweeper.com/t5/image/serverpage/image-id/822i16F9F6B91EBDA5B9/image-size/large?v=v2&px=999)
- Select Truncate logs, then Shrink and then Compact. Each operation may take a while to complete.
This step will clear the tblNtlog and tblNtlogMessage tables in your database, deleting all Windows event log information from your database. Event log data generally takes up the most space. You can still scan new events afterward.
- Restart the Lansweeper Server and web server service in Windows Services, and wait a few minutes for the automated cleanup process to complete.
If you keep running into the database size limit, we recommend moving your Lansweeper database to a licensed SQL Server edition that has no fixed database size limit.
To move your SQL LocalDB database to SQL Server, you can follow the steps in this article. If you are already using SQL Server Express, you can follow these steps to move to another SQL Server instance.
Was this post helpful? Select Yes or No below!
Did you have a similar issue and a different solution? Or did you not find the information you needed? Create a post in our Community Forum for your fellow IT Heroes!
More questions? Browse our Quick Tech Solutions.