关闭smon清理:
SQL> oradebug setorapid
SQL> oradebug event 10513 trace name context forever, level 2
打开smon清理:
SQL> oradebug setorapid
SQL> oradebug event 10513 trace name context off
这么查:
select
pid, program from v$process where program like '%SMON%';
但是这个10513的 event 含义代表什么可以看 $ORACLE_HOME/rdbms/mesg/oraus.msg
参考:
How to Disable Parallel Transaction Recovery When Parallel Txn Recovery is Active (Doc ID 238507.1)
方便版:
-
取消并行回滚,因为并行进程互相干扰,有时并行不如串行回滚效率高,常用于对索引的并行更新回滚。
-
-
找到smon的pid信息
-
col program for a40
-
select pid, program from v$process where program like '%SMON%';
-
-
根据pid设置事件
-
oradebug setorapid '&smon_pid';
-
oradebug event 10513 trace name context forever, level 2
-
-
杀掉并行进程
-
select 'kill -9 '||SPID c from V$PROCESS where PID in (select PID from V$FAST_START_SERVERS);
-
-
取消并行回滚
-
alter system set fast_start_parallel_rollback=false;
-
-
继续回滚
-
oradebug setorapid '&smon_pid';
-
oradebug event 10513 trace name context off
查看回滚段大小(建议每2分钟执行一次,然后比较)
-
set lines 120
col useg format a30
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
-
select c.*,round(c.undoblocks*(select value from v$parameter where name='db_block_size')/1024/1024,1)MB
-
from (
-
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn
-
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks
-
from x$ktuxe a, undo$ b
-
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%'
-
and a.ktuxeusn = b.us#) c;
阅读(2004) | 评论(0) | 转发(0) |