oracle数据库查询锁及解锁
2013-10-31 22:59
330 查看
查询锁资源:
select /*+ RULE */ ls.osuser os_user_name, ls.username user_name, decode(ls.type, 'RW', 'Row wait enqueue lock', 'TM', 'DML enqueue lock', 'TX', 'Transaction enqueue lock', 'UL', 'User supplied lock') lock_type, o.object_name object, decode(ls.lmode, 1, null, 2, 'Row Share', 3, 'Row Exclusive', 4, 'Share', 5, 'Share Row Exclusive', 6, 'Exclusive', null) lock_mode, o.owner, ls.sid, ls.serial# serial_num, ls.id1, ls.id2 from sys.dba_objects o, (select s.osuser, s.username, l.type, l.lmode, s.sid, s.serial#, l.id1, l.id2 from v$session s, v$lock l where s.sid = l.sid) ls where o.object_id = ls.id1 and o.owner <> 'SYS' order by o.owner, o.object_name
解锁:
alter system kill session 'sid,serial#'
相关文章推荐
- 只需在order by 的字段上加主键或索引即可让oracle先按该字段排序,然后再用rownum标号
- oracle查看字符集SQL
- Oracle逻辑结构
- Oracle中的 imp 和 exp
- 创建多个Oracle数据库及相应的实例
- oracle 游标实现多重循环
- oracle存储过程
- Oracle 中 replace
- Windows_oracle10g_2013_10_31_管理用户的对象
- C#连接oracle数据库
- oracle:ora-12560 tns 协议适配器错误
- Oracle Agile PLM Web Services 的实现
- oracle11.2.0.3.0 - 64bit,数据泵导入报ORA-06502,解决
- ORACLE_EBS(PM)项目应用 标准报表开发
- Oracle技术支持是如何分析数据库性能问题的
- [置顶] All about control file in Oracle Database
- oracle在linux配置信息
- oracle在linux配置信息
- oracle 10g 获得dump文件的名称和位置
- oracle/存储过程笔记