Lansweeper data can be stored in a Microsoft SQL LocalDB, Microsoft SQL Server or (deprecated) Microsoft SQL Compact database. Certain operations, like manipulating your database file while services are connected to it, can lead to corruption of your SQL Compact database and errors like the one below. If your SQL Compact database is corrupt, you can use a built-in Lansweeper tool to perform a repair. This article explains how.
To repair your corrupt SQL Compact database, do the following:
- Stop the Lansweeper Server service in Windows Services
- Stop your web server service in Windows Services. Keep in mind that this will log everyone out of the console. Your web server service is either IIS Express or World Wide Web Publishing Service (IIS).
- Take a backup of your SQL Compact database by creating a copy of the following file:
Program Files (x86)\Lansweeper\SQLData\lansweeperdb.sdf
- Run the following tool on your Lansweeper server:
Program Files (x86)\Lansweeper\Tools\DatabaseMaintenance.exe
- Hit the Verify button, then Repair and then Compact. Each operation may take a while to complete.
- Restart the Lansweeper and web server services in Windows Services.