My Oracle Support Banner

How to Investigate Hanging SQL Statements (Doc ID 1916479.1)

Last updated on JUNE 04, 2019

Applies to:

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

Goal

This article addresses cases where a single query appears to hang. This is a problem with a large number of potential solutions since a query appearing to hang may indicate a number of issues including:

Most incidents of a single query appearing to hang can be approached in a similar manner to any SQL that has begun performing slowly, with a few adjustments.

Solution

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
Goal
Solution
 A single query is on CPU but does not finish in a desired timescale, so appears to be hung to the user
 A single query is on CPU in a loop/spin and will never finish
 The whole database is actually hung but it has been noticed only in a single query or this query is THE critical query
 A single query is actually in a hung state – quite rare
 Dictionary queries 'hanging'
 Miscellaneous hanging query situations
References

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