Developer forum

Forum » CMS - Standard features » SQL Server triggers fails

SQL Server triggers fails

Lars Larsen
Lars Larsen
Reply

Hi

We have a Dynamicweb solution running Dynamicweb v8.8.1.34 on SQL Server 2012. The solution is an old solution starting on v8.2.3.17 and probably SQL Server 2008. Now errors occur e.g. if a user is saved or a news article in the old Newsv2 module is saved. The errors are caused by triggers (see attachment). I think these triggers are leftovers from old DW versions, am I right? The purpose of these triggers are to ensure referential integrity before delete or update operations. But aren't these triggers replaced by foreign key relations ships? So can these triggers be deleted? And if these triggers are leftovers why haven't they been deleted by an earlier Dynamicweb update?

Capture.PNG

Replies

 
Nicolai Pedersen
Reply

Hi Lars

We do not ship triggers (AFAIK) - so I think that might be something SQL-Server added when upgrading from a previous version where it had some foreign key constraint of old types?

So I would believe the triggers can be deleted - I do not have that one in my database...

We have not deleted them because to the best of my knowledge, we did not add them manually.

BR Nicolai

 
Lars Britz
Reply
This post has been marked as an answer

Hi Lars, 

We have seen this a couple of times, when migrating from SQL2008 > SQL2012, especially on older solutions, that might have run DW7 or have been upsized from access. In DW8 and DW9 triggers are not used, so you can delete them by using the following script:
https://www.dropbox.com/s/gdwqkxonm2ikh0x/SQL2012%202%20-%20Drop%20all%20triggers.sql?dl=0

Votes for this answer: 1

 

You must be logged in to post in the forum