--查询是否有锁
select sid,t.SERIAL#,t.username 用户名,last_call_et 持续时间,status 状态,LOCKWAIT 等待锁,machine 用户电脑名,logon_time 开始登入时间,sql_text
from v$session t,v$process ,v$sqlarea
where paddr=addr and sql_hash_value=hash_value
and status='ACTIVE' and t.username is not null
order by last_call_et desc;
--解锁语句
alter system kill session'390,2343';
select sid,t.SERIAL#,t.username 用户名,last_call_et 持续时间,status 状态,LOCKWAIT 等待锁,machine 用户电脑名,logon_time 开始登入时间,sql_text
from v$session t,v$process ,v$sqlarea
where paddr=addr and sql_hash_value=hash_value
and status='ACTIVE' and t.username is not null
order by last_call_et desc;
--解锁语句
alter system kill session'390,2343';