[Oracle] 행걸린 사용자 찾기

2013. 10. 8. 15:09Database/Oracle

select
    b.machine "hostname",
    b.username "username",
    b.osuser "OS User",
    b.program "Program",
    a.tablespace_name "TableSpace",
    row_wait_file# "File Number",
    row_wait_block# "Block Number",
    c.owner,
    c.segment_name,
    c.segment_type
from
    dba_data_files a,
    v$session b,
    dba_extents c
where
    b.row_wait_file# = a.file_id
    and c.file_id = row_wait_file#
    and row_wait_block# between c.block_id and c.block_id + c.blocks -1
    and row_wait_file# <> 0
    and type = 'USER'