锁(下)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:05:221056browse

(2)解锁方法 alter system kill session '878,1773'; /*878为SID,1773为SERIAL#*/ select /* rule */ s.username, decode(l.type,'tm','table lock','tx','row lock',null) lock_level, o.owner,o.object_name,o.object_type, s.sid,s.serial#,s.terminal

(2)解锁方法
alter system kill session '878,1773'; /*878为SID,1773为SERIAL#*/


select /*+ rule */ s.username,
decode(l.type,'tm','table lock','tx','row lock',null) lock_level,
o.owner,o.object_name,o.object_type,
s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser
from v$session s,v$lock l,dba_objects o
where l.sid = s.sid
and l.id1 = o.object_id(+)
and s.osuser = 'okf55657' and s.username = 'lbimk_babilon'
and s.username is not null

select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;

select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid
and a.session_id = 745;

alter system kill session'767,19132';


select a.sid,a.serial#,c.object_name,a.sql_id
from v$session a,v$locked_object b,all_objects c
where a.sid=b.session_id
and b.object_id=c.object_id;

select spid from v$process
where addr = (
select paddr from v$session where sid = 767
);

找到对应的spid后,在后台用命令kill -9 spid杀掉OS进程。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:7.MongoDBjavaCRUDNext article:UpgradeVer4.3.xfrom4.2.x