To find out what kind of database you are using and where it is located, go to Configuration -> Database scripts in the web console.
SQL Server
-
Stop the Lansweeper service on your current setup.
-
Take a full backup of your lansweeperdb database using SQL Server Management Studio.
-
If you added any custom images to Lansweeper, you may want to copy these files as well.
Custom images can be found in Program Files/Lansweeper/Website/actions and Program Files/Lansweeper/Website/userpictures.
-
Do a full installation of Lansweeper on your new setup. Our latest installer can be found here.
-
Stop the Lansweeper service on the new server.
-
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 your Lansweeper configuration files make sure that the Data Source, User ID and Password correspond with your SQL Server settings.
The config files are: \Lansweeper\Service\Lansweeperservice.exe.config and \Lansweeper\Website\web.config
-
Execute the below script in your Lansweeper configuration console under Lansweeper/Database Scripts.
Replace “newserver” with the name of your new scanning server.
update tsysasservers set servername='newserver'
GO
update tblassets set scanserver='newserver'
GO
-
Copy any custom images from your old setup to your new one and restart the Lansweeper service on your new server.
-
In the web console, go to Configuration -> Assetpages (http://newserver/Configuration/AssetPages). Update the field Action Path with the name of your new server.
SQL Compact
-
Stop the Lansweeper service on your current setup.
-
Backup your SQL Compact database. (Copy the file \Lansweeper\SQLDATA\lansweeperdb.sdf)
-
If you added any custom images to Lansweeper, you may want to copy these files as well.
Custom images can be found in /Lansweeper/Website/actions and /Lansweeper/Website/userpictures.
-
Do a full installation of Lansweeper on your new setup. Our latest installer can be found here.
-
Stop the Lansweeper service on the new server.
-
Restore the database backup onto the new server, overwriting the database created by the setup.
-
In your Lansweeper configuration files make sure that the Data Source of the connectionstring correspond with your SQL Server settings.
The config files are: \Lansweeper\Service\Lansweeperservice.exe.config and \Lansweeper\Website\web.config
-
Execute the below script in your Lansweeper configuration console under Lansweeper/Database Scripts.
Replace “newserver” with the name of your new scanning server.
update tsysasservers set servername='newserver'
GO
update tblassets set scanserver='newserver'
GO
-
Copy any custom images from your old setup to your new one and restart the Lansweeper service on your new server
-
In the web console, go to Configuration -> Assetpages (http://newserver/Configuration/AssetPages). Update the field Action Path with the name of your new server.