My Oracle Support Banner

ORA-04020 Deadlocks: Most Common Causes (Doc ID 166924.1)

Last updated on OCTOBER 23, 2019

Applies to:

Oracle Database - Personal Edition - Version and later
Oracle Database - Standard Edition - Version and later
Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.


 This document outlines the most common scenarios for ORA-04020 Deadlocks and how to avoid them.

Troubleshooting Steps

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document
Troubleshooting Steps
 Reasons for getting a ORA-04020 error
 1. Self-Deadlocks
 The recompilation of a trigger can sometimes result in an ORA-04020
 Compiling circular dependent code
 ORA-4020 self deadlock on drop table with a functional index
 ORA-04020 when creating functional indexes due to the usage of %TYPE
 ALTER TABLE Command Fails Using INDEX ONLINE Option
 DBCA scripts contain an error "ORACLE_SID PIPPO" instead of correct "ORACLE_SID=PIPPO".
 Truncating a synonym raises an ORA-04020 "deadlock detected" rather than an ora-942 "invalid table or view".
 2. Deadlocks between concurrent sessions

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.