
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-05-2019 04:45 PM
I followed the instructions here https://www.lansweeper.com/knowledgebase/move-lansweeper-to-different-server/ to migrate our installation to a new server. The new server has a different name.
Once the migration was complete, under Scanning Targets I have both the old server and the new server. I have not found a way to move all the scan targets from OldServer to NewServer. Does a way exist?
Solved! Go to Solution.
- Labels:
-
General Discussion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2024 11:40 AM
Hello rtaylor,
The SQL Script that is mentioned in step 8 of the KB article should do that. It will remove the wrong server tab and modify all scanning targets to the new scanning server. Don't forget that step.
7.2 is a pretty old version, must be over 5 years. Hopefully, you also followed the migration steps in this KB article:
https://community.lansweeper.com/t5/lansweeper-maintenance/convert-a-deprecated-sql-compact-database...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2024 11:40 AM
Hello rtaylor,
The SQL Script that is mentioned in step 8 of the KB article should do that. It will remove the wrong server tab and modify all scanning targets to the new scanning server. Don't forget that step.
7.2 is a pretty old version, must be over 5 years. Hopefully, you also followed the migration steps in this KB article:
https://community.lansweeper.com/t5/lansweeper-maintenance/convert-a-deprecated-sql-compact-database...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2019 04:26 PM
Ray

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2019 02:38 PM
1. Click on the Assets tab off the main bar.
2. Then Scroll all the way over to the right and type the name of the old server into the scanserver field.
3. Then check the box next to the name field to select all devices to select everything on the page.
4. Click the Edit Fields action on the left.
5. Change the box that says no field selected to scanserver, then in the other box, select your new sever.
6. If there is more than 250 devices on that server you may have to do it again, to make sure all of them transfer.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2024 10:40 PM
"scanserver" is not an available option in the list of fields.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2019 01:46 PM
Also, just to be safe, it's probably best to make sure you have a recent database backup.
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎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***).
