cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Hertel
Engaged Sweeper
Hi

I have read the knowledge base article on what needs to be done to move Lansweeper to a new server.

The Process I will follow is below, but i dont understand why I would need to run the SQL scripts if the Database that will be used will be the same one on our SQL server.
The process I will follow is as below.

Stop Lansweeper services on current setup.
Backup Database.
Move Database on new Instance of SQL but on same SQL server.
Install Lansweeper latest version on new server Windows 2012 R2 and attach the installation to the moved SQL DB.
Move any custom data reports etc... What are the locations of these to the new Installation?

Test and see all is working also if new data is being added successfully top new Lansweeper installation.

If not then just revert back to the old Lansweper server setup and database on the current Instance. If i have missed anything let me know.
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Hertel wrote:
The Process I will follow is below, but i dont understand why I would need to run the SQL scripts if the Database that will be used will be the same one on our SQL server.

If you're referring to the script below: you need to execute this in order to reset the user used by the Lansweeper service and web console to connect to the database. When restoring/moving databases, the database user often gets corrupted.
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


Step-by-step instructions for moving your Lansweeper installation can be found here: http://www.lansweeper.com/kb/17/move-lansweeper-to-different-server.html
Reports and settings are stored in your database, so these will be moved along with your data.

View solution in original post

2 REPLIES 2
jacastillo
Engaged Sweeper

Every time I run the script on the new installation, after importing the backup, I get the following errors and cannot complete the migration:

Msg 15151, Level 16, State 1, Line 3
Cannot drop the schema 'lansweeperuser', because it does not exist or you do not have permission.
Msg 15151, Level 16, State 1, Line 5
Cannot drop the user 'lansweeperuser', because it does not exist or you do not have permission.
Msg 15007, Level 16, State 1, Procedure sp_droplogin, Line 26 [Batch Start Line 6]
'lansweeperuser' is not a valid login or you do not have permission.

Hemoco
Lansweeper Alumni
Hertel wrote:
The Process I will follow is below, but i dont understand why I would need to run the SQL scripts if the Database that will be used will be the same one on our SQL server.

If you're referring to the script below: you need to execute this in order to reset the user used by the Lansweeper service and web console to connect to the database. When restoring/moving databases, the database user often gets corrupted.
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


Step-by-step instructions for moving your Lansweeper installation can be found here: http://www.lansweeper.com/kb/17/move-lansweeper-to-different-server.html
Reports and settings are stored in your database, so these will be moved along with your data.