cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DSKIM
Engaged Sweeper
We've been running LS for a little over a year now, and (according to the main page) our database is running out of space. The message states that there is only 370 MB free of 4096 MB, however there is plenty of free space available on the server running LS and the SQL DB.

Is there a setting somewhere that limits the size of the database to 4 GB?
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
The problem is that you are using SQL server 2008. In this version the limit was still 4gb. Since SQL server 2008 r2 express the database size limit is raised to 10 GB.

We recommend that you install sql server 2008 r2 express edition and then do the following to move the database to the new sql server:

- Stop your Lansweeper service.
- Stop the service of whichever web server you are currently using: World Wide Web Publishing Service (IIS) or IIS Express.
- Take a full backup of your lansweeperdb database using SQL Server Management Studio.
- Run the Lansweeper installer on your new database server. Choose New Installation\Advanced Install and select only the database for installation.
- Do a restore of the database backup and overwrite the lansweeperdb database on the new server.
- Execute the below script in SQL Server Management Studio. This will ensure that the SQL user for your Lansweeper database is configured correctly.

use lansweeperdb
GO
drop schema lansweeperuser
GO
drop user lansweeperuser
go
execute sp_droplogin lansweeperuser
go
use master
GO
EXEC sp_addlogin 'lansweeperuser', 'mysecretpassword0*', 'lansweeperdb', [English]
GO
use lansweeperdb
go
EXEC sp_grantdbaccess 'lansweeperuser', 'lansweeperuser'
GO
EXEC sp_addrolemember [db_owner], 'lansweeperuser'
Go

- In the Lansweeper configuration files on your scanning and web server make sure that the Data Source, User ID and Password correspond with your SQL Server settings. The config files are:

%Program Files%\Lansweeper\Service\Lansweeperservice.exe.config
%Program Files%\Lansweeper\Website\web.config

- Restart your Lansweeper and web server services.

View solution in original post

6 REPLIES 6
Hemoco
Lansweeper Alumni
Yes you can also use this process to migrate to sql server 2014 express.
DSKIM
Engaged Sweeper
Thank you!

I imagine that the process would be the same if I were to upgrade the DB to SQL Server 2014 Express?
Hemoco
Lansweeper Alumni
The problem is that you are using SQL server 2008. In this version the limit was still 4gb. Since SQL server 2008 r2 express the database size limit is raised to 10 GB.

We recommend that you install sql server 2008 r2 express edition and then do the following to move the database to the new sql server:

- Stop your Lansweeper service.
- Stop the service of whichever web server you are currently using: World Wide Web Publishing Service (IIS) or IIS Express.
- Take a full backup of your lansweeperdb database using SQL Server Management Studio.
- Run the Lansweeper installer on your new database server. Choose New Installation\Advanced Install and select only the database for installation.
- Do a restore of the database backup and overwrite the lansweeperdb database on the new server.
- Execute the below script in SQL Server Management Studio. This will ensure that the SQL user for your Lansweeper database is configured correctly.

use lansweeperdb
GO
drop schema lansweeperuser
GO
drop user lansweeperuser
go
execute sp_droplogin lansweeperuser
go
use master
GO
EXEC sp_addlogin 'lansweeperuser', 'mysecretpassword0*', 'lansweeperdb', [English]
GO
use lansweeperdb
go
EXEC sp_grantdbaccess 'lansweeperuser', 'lansweeperuser'
GO
EXEC sp_addrolemember [db_owner], 'lansweeperuser'
Go

- In the Lansweeper configuration files on your scanning and web server make sure that the Data Source, User ID and Password correspond with your SQL Server settings. The config files are:

%Program Files%\Lansweeper\Service\Lansweeperservice.exe.config
%Program Files%\Lansweeper\Website\web.config

- Restart your Lansweeper and web server services.
sukaitsu
Champion Sweeper
Did you check if there is a lansweeperdb.sdf file in that directory? SQL Server Express should have a limit of 10GB, not 4GB.
Thank you, Jeffrey Smith Enterprise Applications Security (319) 499-6310 JefSmith@geico.com
DSKIM
Engaged Sweeper
Sorry, I should have mentioned that the DB is hosted on SQL Server 2K8 Express, which is installed on the same machine as LS.
sukaitsu
Champion Sweeper
Hey,

It sounds like you are using Compact SQL instead of SQL Server. Check if you have a lansweeperdb.sdf located in this directory:

.\Lansweeper\SQLData\

If you are running on Compact SQL, I would install SQL Server 2012 Express and migrate the Database over. It has a limit of 10GB per database, or SQL Server Enterprise, which is unlimited.
Thank you, Jeffrey Smith Enterprise Applications Security (319) 499-6310 JefSmith@geico.com