My Oracle Support Banner

How to Find the Session Holding Lock on the Object being tested at Unit Test Of SQL Developer Which shows Unable to Obtain Lock At This Time (Doc ID 2631449.1)

Last updated on OCTOBER 03, 2024

Applies to:

Oracle SQL Developer - Version 18.2 and later
Information in this document applies to any platform.

Goal

 You are trying to test a procedure ( say PROCEDURE1) using Unit Test at SQL Developer and getting following message

 

This message is an indication that some other user has locked that specific Object for test which you are trying to test at unit testing.

You would like to know the session which has locked object so that you can clear that session and proceed with testing.

 

NOTE:
For the Demonstration purpose Following has been considered as sample for better understanding.

UT_USER           - is the schema user which owns the Unit Test Repository
PROCEDURE1    - Is the Object with the Lock.
WS1                 - Workstation1 connected as UT_USER
WS2                 - Workstation2 connected as UT_USER

WS2 has session ID 65 which has locked PROCEDURE1 and WS1 is trying to Lock same PROCEDURE1

 

 

 

 

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

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