Overview
If you are seeing the following error in your site logs, there may be an issue with the SQL server tables that store your EventLog:
The DELETE statement conflicted with the REFERENCE constraint "FK_ExceptionEvents_EventLog".
The conflict occurred in database "databaseName", table "dbo.ExceptionEvents",
column 'LogEventID'.
The DNN event log stores records of exceptions and other registered events. This error can be caused by a failed EventLog clearing, or simply by errors or corruption in the table.
Environment
To perform this fix, you'll need:
- Platform/Evoq 7.4 and above
- Access to the SQL Server
Solution
- Examine the error message to get the foreign key location. For example:
The DELETE statement conflicted with the REFERENCE
constraint "FK_ExceptionEvents_LogEventId". <-- Foreign Key name
The conflict occurred in database "EvoqContent" <-- Database Name
, table "dbo.ExceptionEvents" <-- Table Name
, column 'LogEventID'. <-- Column Name - Open SSMS and expand the Tables view for your database.
- Find the table and expand the keys sub-menu. You should find the foreign key listed in the error message:
- Right-click on the key, then select Modify
- On the next window, expand the INSERT and UPDATE specification, then set the Delete Rule to Cascade:
- Select Close, then save the table through File > Save (or Ctrl+S). You will get a warning about saving the table to the database.
Testing
The error should stop appearing in your site logs. Since this error is tied to Scheduler job frequency, you may need to wait until the next cleanup job runs.
Comments
1 comment
Thank you
Please sign in to leave a comment.