Question / Problem:
Reporting Retention Policy is not working, and the following error was outputted in Reporting log.
08/08/2019 08:02:25.650 PM Reporting Error: 6 : Could not execute the Staging2Wh data task, because an exception has occured
08/08/2019 08:02:25.650 PM Reporting Error: 6 : Exception: The DELETE statement conflicted with the REFERENCE constraint "FK_page_dim3". The conflict occurred in database
The statement has been terminated.
The issue was reported as bug 1582420- [126.96.36.199] COD 14724 - 25043583 - The DELETE statement conflicted with the REFERENCE constraint,
but customer can not upgrade to KTA 188.8.131.52 or later.
Is there any workaround?
Answer / Solution:
As a possible workaround (which will allow Retention delete those records in next run) we can suggest to run following query on Reporting Warehouse DB:
We recommendation performing full KTA DB backups prior and running queries out of hours for precautionary measures.
delete from page_dim Where doc_key_sys_clsf in (select doc_key from tmp_delete_doc_dim)