1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| set linesize 500 set pagesize 500 col sid for 9999999 col spid for a5 col serial# format 999999 col event format a23 col p123 format a15 col wait_time format 999 col sql_id for a15 col username format a12 col machine format a12 col program format a12 alter session set cursor_sharing=force; select s.sid,s.serial#,p.spid,s.username,s.machine,s.program,s.event,S.P1 || '/'||S.P2||'/'||S.P3 P123,S.wait_time,NVL(SQL_ID,S.PREV_SQL_ID) SQL_ID from v$session s,v$process p where s.username is not null and s.paddr=p.addr and s.status='ACTIVE' and s.sid<>(select sid from v$mystat where rownum=1) order by p.pid desc;
SELECT sid, serial#,program,status,logon_time FROM v$session WHERE username = '&UserNAME';
SQL> alter system kill session '1066,7091' immediate;
System altered.
ๆฅ็ไผ่ฏๅ็ญๅพ
ๆถ้ด set linesize 500 set pagesize 500 col sid format 9999 col spid for a5 col serial# format 99999 col event format a23 col p123 format a15 col wait_time format 999 col sql_id for a15 col username format a12 col machine format a12 col program format a12 alter session set cursor_sharing=force; select s.sid,s.serial#,p.spid,s.username,s.machine,s.program,s.event,S.P1 || '/'||S.P2||'/'||S.P3 P123,S.wait_time,w.time_waited,NVL(SQL_ID,S.PREV_SQL_ID) SQL_ID from v$session s,v$process p,v$session_wait_class w where s.username is not null and s.paddr=p.addr and s.sid=w.sid and s.status='ACTIVE' and s.sid<>(select sid from v$mystat where rownum=1) order by s.sid desc;
select sql_id,child_number from v$sql where sql_id='6k56ksvgv29qj'; select * from table(dbms_xplan.display_cursor('6k56ksvgv29qj',0));
set linesize 300 set pagesize 300 col sid format 9999 col spid for a5 col serial# format 99999 col event format a23 col p123 format a15 col wait_time format 999 col sql_id for a15 col username format a12 col machine format a12 col program format a12 alter session set cursor_sharing=force; select s.sid,s.serial#,p.spid,s.username,s.machine,s.program,s.event,S.P1 || '/'||S.P2||'/'||S.P3 P123,S.wait_time,NVL(SQL_ID,S.PREV_SQL_ID) SQL_ID,t.sql_text from v$session s,v$process p,v$sql t where s.username is not null and s.paddr=p.addr and s.status='ACTIVE' and s.sid<>(select sid from v$mystat where rownum=1) and t.sql_id=sql_id order by p.pid desc;
|