We’re currently experiencing a high volume of support requests, which may result in longer response times — thank you for your patience and understanding.
Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DavidHooie
Engaged Sweeper II

We spun up 2 new Scan servers on a newer server OS. They're going to replace our old ones. So ServerA-01 is being replaced by ServerA-02 and ServerB-01 is being replaced by ServerB-02.

I can see all 4 servers now in my web interface, but I want to move all the scan targets from ServerA-01 over to 02. Can't find any way to do that! I really don't want to have to reinvent the wheel here. Surely there's some way to do this, right?

2 REPLIES 2
MarkPayton
Engaged Sweeper II

I am in a similar situation, however my old scan server has died. I set the new server up manually and restored a backup to it. The installation now sees that there are two lansweeper servers. All of the scanning targets are assigned to the old server, so they are not scanning. I tried the instructions in the link, as well as the instructions linked from there to just move the scanning targets, but neither worked. I tried this code from the second article,

DELETE FROM tsysasservers
WHERE servername = 'NewServer';
GO

UPDATE tsysasservers
SET
servername = 'NewServer'
WHERE servername = 'OldServer';
GO

UPDATE tblassets
SET
scanserver = 'NewServer'
WHERE scanserver = 'OldServer';
GO

but it returned the error

Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK_tblLsAgentRelayConfig_tsysASServers". The conflict occurred in database "lansweeperdb", table "dbo.tblLsAgentRelayConfig", column 'Servername'.
The statement has been terminated.
Msg 2627, Level 14, State 1, Line 5
Violation of PRIMARY KEY constraint 'PK_tsysASServers'. Cannot insert duplicate key in object 'dbo.tsysASServers'. The duplicate key value is (<NewServer>).
The statement has been terminated.

Any suggestions on how to proceed? Can i delete and then recreate the constraints on the two tables and, if so, is there code to set the constraints properly?

 

FrankSc
Lansweeper Tech Support
Lansweeper Tech Support

Hello DavidHooie,

The script in the KB article below allows you to move scan targets to another scan server. 
But it will remove as well the one you don't need any longer. 
Move your installation to a different server - Lansweeper

Before running a script, make sure to make a backup, just in case.

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now