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?