cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chada
Engaged Sweeper III
I am moving my web/app portion of lansweeper to a new server and keeping the same back end database. The move procedure http://www.lansweeper.com/kb/17/move-lansweeper-to-different-server.html
step 11 has a flaw now that the database has a few new tables for the deployment features. The reference constraint in that other table is preventing a change in the below referenced tables. I believe the reference constraint needs to be dropped and then re-added. I will also open a support request on this one but this issue being in the forum may help someone else.

use lansweeperdb
GO

update tsysasservers set servername='servernamenew' where servername='servernameold'
GO
update tblassets set scanserver='servernamenew' where scanserver='servernameold'
GO

Msg 547, Level 16, State 0, Line 4
The UPDATE statement conflicted with the REFERENCE constraint "FK_tsysPackageExecution_tsysASServers". The conflict occurred in database "lansweeperdb", table "dbo.tsysPackageExecution", column 'ScanServer'.
The statement has been terminated.

(0 row(s) affected)
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
The problem is not the script, but the database. The database should be configured to perform cascading updates/deletions, but isn't. We've already fixed this in this internal Lansweeper update/installer, which isn't available on the website yet. Alternatively, you can drop the constraint causing the issue, update the server name and re-add the constraint.

View solution in original post

2 REPLIES 2
chada
Engaged Sweeper III
This is exactly what we did to work around the problem. 3 card Monty fix. 🙂
Susan_A
Lansweeper Alumni
The problem is not the script, but the database. The database should be configured to perform cascading updates/deletions, but isn't. We've already fixed this in this internal Lansweeper update/installer, which isn't available on the website yet. Alternatively, you can drop the constraint causing the issue, update the server name and re-add the constraint.