→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎11-05-2019 04:45 PM
‎11-06-2019 04:26 PM
‎11-06-2019 02:38 PM
‎11-06-2019 01:46 PM
Use Lansweeperdb
/* deletes the empty record of the new server, replace NewServer with the NetBIOS name of your new server (as seen in the web console) */
delete from tsysasservers where servername = 'NewServer'
GO
/* Renames your old server to the name of your new server, effectively transferring configuration. Replace NewServer with the NetBIOS name of your new server and OldServer with the NetBIOS name of your old server (as seen in the web console) */
update tsysasservers set servername = 'NewServer' where servername = 'OldServer'
GO
/* Moves the assets scanned by the old server to the new server, replace NewServer with the NetBIOS name of your new server and OldServer with the NetBIOS name of your old server (as seen in the web console) */
update tblassets set scanserver = 'NewServer' where scanserver = 'OldServer'
GO
‎12-12-2023 09:31 PM
Hello, we have a similar issue, except we are getting the following error below when trying to run the script any suggestions to fix the issue?
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.
Violation of PRIMARY KEY constraint 'PK_tsysASServers'. Cannot insert duplicate key in object 'dbo.tsysASServers'. The duplicate key value is (***NEW SERVER NAME***).
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now