- 最后登录
- 2014-3-29
- 在线时间
- 22 小时
- 威望
- 0
- 金钱
- 536
- 注册时间
- 2013-4-5
- 阅读权限
- 10
- 帖子
- 30
- 精华
- 0
- 积分
- 0
- UID
- 1018
|
1#
发表于 2013-6-21 20:41:24
|
查看: 5970 |
回复: 8
DB版本:
ACTION_TIME ID ACTION VERSION COMMENTS
------------------------------ ---------- -------------------- ---------- ----------------------------------------
14-JUL-12 10.48.02.423325 AM 2 APPLY 11.2.0.3 PSU 11.2.0.3.2
14-JUL-12 12.06.26.890505 PM 2 APPLY 11.2.0.3 PSU 11.2.0.3.2
OS版本:REDHAT 5.8 (x86-64bit)
DB是单机。
每天凌晨0点-2点半左右,监控会出现大量ora-1652的告警,经查证,都是以下等待事件和SQL造成,下面的temp字段是每条SQL消耗的temp大小。
--direct path write temp事件信息
select to_char(a.SAMPLE_TIME, 'yyyy-mm-dd hh24:mi:ss') sample_time,
c.username,
a.SESSION_ID,
a.SESSION_SERIAL#,
a.instance_number,a.program,a.module,a.blocking_session,a.temp_space_allocated/1024/1024 temp,
a.event,
b.SQL_TEXT
from DBA_HIST_ACTIVE_SESS_HISTORY a, DBA_HIST_SQLTEXT b, dba_users c
where a.SQL_ID = b.SQL_ID and a.sample_time between to_date('2013-6-16 00:00:01','yyyy-mm-dd hh24:mi:ss')
and to_date('2013-6-16 03:30:01','yyyy-mm-dd hh24:mi:ss')
and a.user_id = c.user_id
and a.instance_number = 1
--and snap_id between 8881 and 8882
and a.event like '%temp%';
sample_time username SESSION_ID SESSION_SERIAL# instance_number program module blocking_session temp event SQL_id
----------- -------- ---------- --------------- --------------- ------- ------------ ---------------- ----- --------------------- --------
2013-06-16 00:50:20 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 9564 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:49:40 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 7239 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:49:20 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 6032 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:49:00 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 4892 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:48:50 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 4310 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:47:50 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 1041 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:47:40 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 475 direct path write temp 8m2sw3z7kt6ph
2013-06-16 00:47:30 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 9556 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:47:20 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 8980 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:46:10 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 4957 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:45:40 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 3376 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:45:10 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 1732 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:44:49 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 521 direct path write temp 2d1p0p5k3f8fu
2013-06-16 00:44:39 SYS 13 29033 1 oracle@cnsz081021 (M000) MMON_SLAVE 40 direct path write temp 2d1p0p5k3f8fu
2013-06-16 02:03:00 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 4343 direct path write temp 7jdjp940pj0z0
2013-06-16 02:02:00 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 306 direct path write temp 7jdjp940pj0z0
2013-06-16 02:01:50 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 3475 direct path write temp 7jdjp940pj0z0
2013-06-16 02:01:40 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 3127 direct path write temp 7jdjp940pj0z0
2013-06-16 02:01:20 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 1736 direct path write temp 7jdjp940pj0z0
2013-06-16 02:01:10 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 1038 direct path write temp 7jdjp940pj0z0
2013-06-16 02:01:00 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 517 direct path write temp 7jdjp940pj0z0
2013-06-16 02:00:50 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 1941 direct path write temp 7jdjp940pj0z0
2013-06-16 02:00:30 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 562 direct path write temp 7jdjp940pj0z0
2013-06-16 02:00:20 DBMGR 26 21513 1 oracle@cnsz081021 (J001) DBMS_SCHEDULER 943 direct path write temp 7jdjp940pj0z0
SQL
8m2sw3z7kt6ph:
select p, NULL, NULL from (select count(*) p from v$rman_status where operation = 'BACKUP COPYROLLFORWARD');
2d1p0p5k3f8fu:
select p, NULL, NULL from (select count(*) p from v$rman_status where operation = 'BLOCK MEDIA RECOVERY');
7jdjp940pj0z0:
/* SQL Analyze(26,1) */ SELECT /*+RULE*/ TO_CHAR(STAMP) || '_' || TO_CHAR(RECID) BACKUP_ID, SESSION_STAMP, SESSION_RECID,
START_TIME,END_TIME, STATUS BACKUP_STATUS,OBJECT_TYPE BACKUP_TYPE
FROM SYS.V_$RMAN_STATUS WHERE OPERATION='BACKUP'
AND (END_TIME > SYSDATE-:1 /1000/60/60/24 or (END_TIME is null and START_TIME > SYSDATE-:2 /1000/60/60/24)); |
|