oracle 锁查找与kill

SQL> SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
  2          id1, id2, lmode, request, type
  3     FROM V$LOCK
  4    WHERE (id1, id2, type) IN
  5              (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
  6    ORDER BY id1, request;

SESS                                                    ID1        ID2
------------------------------------------------ ---------- ----------
     LMODE    REQUEST TY
---------- ---------- --
Holder: 587                                          393238     322845
         6          0 TX

Waiter: 855                                          393238     322845
         0          6 TX


SQL> SELECT SID,SERIAL#,PADDR FROM V$SESSION WHERE SID = 587;

       SID    SERIAL# PADDR
---------- ---------- --------
       587      12090 BEDF1720

SQL> alter system kill session '587,12090';

系统已更改。

SQL>
 

你可能感兴趣的:(oracle,oracle,kill,职场,休闲,锁找查)