DWH job fails with ORA-04020: deadlock detected while trying to lock object
search cancel

DWH job fails with ORA-04020: deadlock detected while trying to lock object

book

Article ID: 111760

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

The Load Data Warehouse (DWH) Job fails. The error log shows the following: ORA-04020: deadlock detected while trying to lock object XXXXXX.

Example:

CA Clarity][Oracle JDBC Driver][Oracle]ORA-04020: deadlock detected while trying to lock object PPM_DWH.DWH_INV_INVESTMENT

Cause

Typically when the deadlock error occurs it is because two different database sessions each attempt to update rows in the same table.

Resolution

Rerun the Load DWH job. Usually, the job will not fail again.

There is a defect DE50236 that can cause this which is fixed in 15.9

The following scenarios are potential reasons for deadlock issues:

  • Multiple users accessing and updating same tables
  • The same job is running or multiple jobs are running concurrently
  • 3rd party tool is accessing the table
  • For On-Premise customers: When deadlocks happen, the DBA can check the Oracle deadlock trace (.trc). This may help troubleshoot as it will show DEADLOCK DETECTED.

Additional Information

See also: Load DWH job frequently reported issues