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
- Go to Admin Center
- Permanently Purge
- 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:
- Customer need to provide a written Approval for an Data cleanup Script at the database level ( No negative impact )
- 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
See Also
- 3375924 - How To check User Status Via Data inspector
- 3319018 - How To Enable Feature Data Inspector
- 2584658 - How to Check if a User is an EC User using the Integration Center - isECRecord Boolean
- 2088065 - Data Retention Management - Purge Data - Platform
- 2614665 - Syncing the Termination Date between Employee Central and the SuccessFactors Platform
- 2089382 - User Import Error - Duplicate Username - Platform
- 2457516 - Cannot update/ modify username
- 2392076 - User Permanent Purge Feature
- 2615360 - Data Protection and Privacy - Data Retention Time Management (DRTM) - Master Data Purge for Inactive Users
- 2392094 - Re-activate a purged user via employee import feature
- 3236874 - Soft Purge failed with error Completed with errors
- 2596758 - Soft Purged Users Report
- 2179378 - Purge Request fails automatically
- 3038172 - [Onboarding] DRTM Onboarding Purge
- 3052056 - How to delete or permanent purge an inactive onboardee user - Onboarding
- 2922739 - How to purge integrated external learners using DRM - SAP SuccessFactors Learning
- 2247664 - Compensation & Variable Pay - Not possible to purge user: User belongs to compensation/variable pay form(s) thus can't be purged
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, Incident INC10322234, Raised RITM1532253 to cleanup stale data, Data cleanup , KBA , LOD-SF-EC-DRM , Data Retention Management - (DRM & DRTM) EC Data Only , LOD-SF-EC , Employee Central , LOD-SF-PLT , Platform Foundational Capabilities , Problem