[20160701]调整AWR快照生成时间.txt
--itpub有人要求调整AWR快照生成时间,也就是要求不是整点执行,实际上11g有1个参数awr_snapshot_time_offset可以控制这种引为.
--测试看看:
--链接:http://www.itpub.net/thread-1622837-1-1.html
1.环境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SYS@book> alter system set awr_snapshot_time_offset=900 scope=memory;
System altered.
2.等下午观察:
SELECT *
FROM (SELECT snap_id
,snap_level
,instance_number
,TO_CHAR (begin_interval_time, 'yyyy/mm/dd hh24:mi:ss')
begin_interval_time
,TO_CHAR (end_interval_time, 'yyyy/mm/dd hh24:mi:ss')
end_interval_time
,TO_CHAR (flush_elapsed) flush_elapsed
,TO_CHAR (startup_time, 'yyyy/mm/dd hh24:mi:ss') startup_time
,error_count
FROM DBA_HIST_SNAPSHOT
WHERE dbid = 0.133740171e+010
ORDER BY 1 DESC)
WHERE ROWNUM <= 5;
SNAP_ID SNAP_LEVEL INSTANCE_NUMBER BEGIN_INTERVAL_TIME END_INTERVAL_TIME FLUSH_ELAPSED STARTUP_TIME ERROR_COUNT
---------- ---------- --------------- ------------------- ------------------- ------------------ ------------------- -----------
4189 1 1 2016/07/01 13:15:39 2016/07/01 14:15:40 +00000 00:00:00.1 2016/06/30 11:58:01 0
4188 1 1 2016/07/01 12:15:37 2016/07/01 13:15:39 +00000 00:00:00.6 2016/06/30 11:58:01 0
4187 1 1 2016/07/01 11:15:36 2016/07/01 12:15:37 +00000 00:00:00.1 2016/06/30 11:58:01 0
4186 1 1 2016/07/01 10:00:34 2016/07/01 11:15:36 +00000 00:00:00.7 2016/06/30 11:58:01 0
4185 1 1 2016/07/01 09:00:32 2016/07/01 10:00:34 +00000 00:00:00.6 2016/06/30 11:58:01 0
--从11:15开始,以后生成的都是15分钟的.