oracle死锁查询 kill和解锁 账号锁定

查询死锁:

select sess.sid ||','||   
    sess.serial#,  
    lo.oracle_username,   
    lo.os_user_name,   
    ao.object_name,   
    lo.locked_mode,  
        SESS.machine  
    from v$locked_object lo,   
    dba_objects ao,   
    v$session sess   
where ao.object_id = lo.object_id and lo.session_id = sess.sid ;  

解锁

--kill该事务 例子 sid为339,serial#为13545
 alter system kill session '339,13545';

 解锁账号锁定 (itouch_ceshi 库)

alter user itouch_ceshi account unlock

更改密码(mima123456 密码)

alter user itouch_ceshi identified by mima123456

 

posted @ 2020-11-04 15:54  吴枫  阅读(198)  评论(0编辑  收藏  举报