Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Failed to log deleted entities. Error: duplicate key value violates unique constraint

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_Rice
Support
Support

Failed to log deleted entities. Error: duplicate key value violates unique constraint

Last Update:

May 25, 2021 7:14:48 AM

Updated By:

Sonja_Bauernfeind

Created date:

Mar 26, 2019 5:26:42 AM

Attachments

Error: Failed to log deleted entities is being logged by the Qlik Sense repository 

ERROR ServerName System.Repository.Repository.Core.Database.DeletedEntityLog 160 8f4d9d92-6baa-425a-89c5-0dfb753810c8 Domain\UserName _P Failed to log deleted entities. Error: duplicate key value violates unique constraint "_deletedentitylog_pkey" 8f4d9d92-6baa-425a-89c5-0dfb753810c8 8526 20190325T044004.334-0400

Environment:

 

You can delete all entries from the Deletedentitylog table if you don't mind losing them. It should not affect anything else in the system

psql -h localhost -d QSR -U postgres -p 4432 -f "<PATH_TO_THE_SCRIPT>\BackupAndClean_deletedentitylog.sql" 

BackupAndClean_deletedentitylog.sql

------------------------------------------------------------------------
------------------------------------------------------------------------
--\copy "_deletedentitylog" to '_deletedentitylog_backup' csv;
--\copy "_deletedentitylog" to 'C:\backup\_deletedentitylog_backup' csv;
------------------------------------------------------------------------
--If no path is given as in the first example above, file is stored in 
--C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin
------------------------------------------------------------------------
------------------------------------------------------------------------

\echo 'Storing _deletedentitylog'
SET CLIENT_ENCODING TO 'UTF8';
\copy "_deletedentitylog" to '_deletedentitylog_backup' csv;
RESET CLIENT_ENCODING;

\echo 'Clearing _deletedentitylog'
DELETE FROM "_deletedentitylog";
After running this script, you'll need to restart all services on the Central Node and all Repository services in the environment. 
Labels (1)
Contributors
Version history
Last update:
‎2021-05-25 07:14 AM
Updated by: