SAP Knowledge Base Article - Public

3048464 - Not able to permanent purge user with multiple employments

Symptom

When trying to permanent purge one userID of an employee with multiple employments the error "Execute script to 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: "DC5PRD"."(DO statement)": line 15 col 1 (at pos 501): TrexColumnUpdate failed on table 'DC5PRD_STOCKPM5632:EMP_EMPLOYMENT_INFO' with error: DELETE on DC5PRD_STOCKPM5632:EMP_EMPLOYMENT_INFO(EMPLOYMENT_ID) failed, because 8 rows with corresponding foreign keys still exist in DC5PRD_STOCKPM5632:EMP_JOB_INFO_T(EMPLOYMENT_ID), rc=1536." is presented. 

Environment

  • SAP SuccessFactors HXM Suite 
  • SAP SuccessFactors Employee Central

Reproducing the Issue

  1. One employment of an user with multiple employments needs to be purged 
  2. Follow the KBA 2392076 - User Permanent or Hard Purge feature to soft and permanently purge the needed userID 
  3. Receive an email notification with below error 
    • Subject: Permanent User Purge – [Failed]

      No users or user records were purged from the application because the job failed. The job failed due to:

       Execute script to 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: "DC5PRD"."(DO statement)": line 15 col 1 (at pos 501): TrexColumnUpdate failed on table 'DC5PRD_STOCKPM5632:EMP_EMPLOYMENT_INFO' with error: DELETE on DC5PRD_STOCKPM5632:EMP_EMPLOYMENT_INFO(EMPLOYMENT_ID) failed, because 8 rows with corresponding foreign keys still exist in DC5PRD_STOCKPM5632:EMP_JOB_INFO_T(EMPLOYMENT_ID), rc=1536.

Cause

When an employee has more than one employment all the employments need to be soft purged in order to permanently purge one of the userIDs. 

Otherwise it will present an error. 

Resolution

  1. Make all employments inactive and soft purge them (We recommend to use "Purge Inactive User" tool to soft purge rather than DRTM Master data purge for this case)
  2. After all of them are soft purged you will be able to permanent purge the wanted userID without errors
  3. After the wanted userID is permanent purged customer will be able to return both other users

See Also

2392076 - User Permanent or Hard Purge feature

2545988 - How to Purge/Delete users in SuccessFactors Cloud

2749427 - Unable To Permanently Purge user after a Soft Purge

Keywords

user id, userid, permanently purge, purged, concurrent employment, rehired, multi, multiple, global assignment, GA, CE, unable to purge, not possible to purge, cannot purge , KBA , LOD-SF-EC-ADM , Admin Tools (EC Core only) , LOD-SF-EC-CON , Concurrent Employment , LOD-SF-EC-GA , Global Assignment , LOD-SF-EC-DRM , Data Retention Management - (DRM & DRTM) EC Data Only , Problem

Product

SAP SuccessFactors Employee Central all versions ; SAP SuccessFactors HXM Suite 2011