SAP Knowledge Base Article - Public

2749427 - Unable To Permanently Purge user after a Soft Purge

Symptom

You receive an application error when trying to permanently purge user after a Soft Purge.

The application error ID is accompanied by error:

Run user purge failed: Wrapped Exception: com.successfactors.db.dao.DAOException: SQLException while executing SQL scripts.com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [462]: failed on update or delete by foreign key constraint violation: TrexUpdate failed on table 'DC5PRD_STOCKPM180447:WF_REQUEST_STEP' with error: On Update/Delete action failed on referencing Table; from table DC5PRD_STOCKPM180447:WF_REQUEST_STEP to table DC5PRD_STOCKPM180447:GO_WF_PENDING_HISTORY, action=DELETE, ref-action=restrict hit 12 rows in table 

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental. 

Environment

 SAP SuccessFactors HCM Core - Purge User

Reproducing the Issue

  1. Go to Admin Center 
  2. Permanently Purge 
  3. Result Error Message 

Example Error Result: Wrapped Exception: com.successfactors.db.dao.DAOException: SQLException while executing SQL scripts.com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [462]: failed on update or delete by foreign key constraint violation: TrexUpdate failed on table 'DC5PRD_STOCKPM180447:WF_REQUEST_STEP' with error: On Update/Delete action failed on referencing Table; from table DC5PRD_STOCKPM180447:WF_REQUEST_STEP to table DC5PRD_STOCKPM180447:GO_WF_PENDING_HISTORY, action=DELETE, ref-action=restrict hit 12 rows in table DC5PRD_STOCKPM180447:GO_WF_PENDING_HISTORY, rc=1536."

Cause

This a Data Handling issue

Resolution

DRTM Purge Developer team need to run an update Script to solve this data issue at the database level.

Customer Action:

Please contact Employee Central Support Engineer Team and Add the following to your case:

  1. Customer need to provide a written Approval for an update Script  at the database level ( No negative impact )
  2. After Script Result, You be able to run permanent purge

@Employee Central Product Support: See internal memo for further guidance

FAQ - Additional Information

Q) PURGE ORDER Step for Employee Central User?

A) The steps to be executed for these requests are:

  • Customer / Consultant. Terminate the user Via MSS (UI) or 2511979 - Employee Central: How do I Terminate employees via Import?
  • Customer / Consultant. Terminate the Manager Only Via MSS (UI) 
  • Download UDF “Admin Center --> Employee Export” and verify that Terminate user has been set to inactive
  • Customer / Consultant: Purge the user with Data Retention Management tool. 

Purge order: Always Soft Purge then Hard or Permanent Purge 

Keywords

ECT-112903, ECT-113033, SRSD-44288, foreign key, constraint violation, failed on update or delete by foreign key constraint violation, Wrapped Exception: com.successfactors.db.dao.DAOException: SQLException while executing SQL scripts.com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [462]: failed on update or delete by foreign key constraint violation: TrexUpdate failed on table, On Update/Delete action failed on referencing Table; from table, soft purge, permanent purge, error, script, failed on update or delete by foreign key constraint violation, purge , KBA , LOD-SF-EC-ADM , Admin Tools (EC Core only) , LOD-SF-EC , Employee Central , LOD-SF-PLT , Platform Foundational Capabilities , Problem

Product

SAP SuccessFactors HCM Core 1811