devxlogo

Determine the Session Waiting for a Shared Resource to be Released

Determine the Session Waiting for a Shared Resource to be Released

Here’s how to find out which session is waiting for a shared resource to be released:

Column host     format a6;Column username format a10;Column os_user  format a8;Column program  format a30;Column tsname   format a12; select   b.machine         host,   b.username        username,   b.server,   b.osuser          os_user,   b.program         program,   a.tablespace_name ts_name,   row_wait_file#    file_nbr,   row_wait_block#   block_nbr,   c.owner,   c.segment_name,   c.segment_typefrom   dba_data_files a,   v$session      b,   dba_extents    cwhere   b.row_wait_file# = a.file_idand   c.file_id = row_wait_file#and  row_wait_block#  between c.block_id and c.block_id + c.blocks - 1and  row_wait_file# <> 0and  type='USER';

The returned username will tell you the name of the user account waiting for a lock to be released at a block number.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist