oracle 查詢鎖表資訊

2021-08-27 23:04:01 字數 1119 閱讀 4366

select a.owner 方案名,

a.object_name 表名,

/* b.xidusn 回滾段號,

b.xidslot 槽號,

b.xidsqn 序列號,*/

b.session_id 鎖表session_id,

b.oracle_username 鎖表使用者名稱,

decode(d.type,

'xr',

'null',

'rs',

'ss(row-s)',

'cf',

'ss(row-s)',

'tm',

'table lock',

'pw',

'table lock',

'to',

'table lock',

'ts',

'table lock',

'rt',

'row lock',

'tx',

'row lock',

'mr',

's(share)',

null) 鎖定方式,

c.machine 使用者組,

c.terminal 機器名,

b.os_user_name 系統使用者名稱,

b.process 系統程序id,

decode(c.status, 'inactive', '不活動', 'active', '活動') 活動情況,

c.server,

c.sid,

c.serial#,

c.program 連線方式,

c.logon_time

from all_objects a, gv$locked_object b, sys.gv_$session c, gv$lock d

where (a.object_id = b.object_id)

and (b.process = c.process)

and c.sid = d.sid

and b.locked_mode = d.lmode /*and a.object_name = 'tb_int_oppo_action_state'*/

order by 1, 2;

Oracle鎖資訊查詢

oracle鎖資訊查詢 查詢oracle會話資訊 select from v session t order by t.logon time 查詢oracle等待的會話資訊 select from v session wait t order by t.seconds in wait desc 查詢...

ORACLE鎖表查詢

select rule lpad decode l.xidusn 0,3,0 l.oracle username user name,o.owner,o.object name,o.object type,s.sid,s.serial from v locked object l,dba objec...

Oracle 鎖表 鎖表查詢 結束鎖表程序

1.oracle 鎖表 lock table 表名字in exclusive mode 所記錄 select from 表名字 for update 2.oracle 鎖表查詢 selectb.owner,b.object name,a.session id,a.locked mode from v...