benxiong 发表于 2011-12-22 08:54

ORACLE ASH/AWR

<DIV>
<P><FONT color=#000000 size=4><STRONG>(一) </STRONG></FONT><A onclick="javascript:tagshow(event, 'ASH');" href="javascript:;" target=_self><U><FONT color=#000000 size=4><STRONG>ASH</STRONG></FONT></U></A></P>
<P>&nbsp;用户在<A onclick="javascript:tagshow(event, 'ORACLE');" href="javascript:;" target=_self><U><STRONG><FONT color=#0000ff>ORACLE</FONT></STRONG></U></A>数据库中执行操作时,必然要创建相应的连接和会话,其中,所有当前的会话信息都保存在动态性能视图V$SESSION中,通过该视图,DBA可以查看用户实际执行的操作,或者当前的等待事件等。通常这部分信息是调优过程中的关键信息,不过,一旦连接断开。会话信息就会被同时从V$SESSION及其它相关视图中清除,也就是说,用户执行完操作走人,而你(DBA),如果不能在当前逮到他,过了这点,就不知道它曾经做过什么了。</P>
<P>  10g 版本中,ORACLE又新增加了一个视图(其它是若干,不过咱们还是以session为引子说):V$ACTIVE_SESSION_HISTORY,看名字就知道,就是活动会话的历史记录,这下,即<A onclick="javascript:tagshow(event, '%CA%B9%D3%C3');" href="javascript:;" target=_self><U><STRONG><FONT color=#0000ff>使用</FONT></STRONG></U></A>户操作完成后,断开了连接也不怕,因为其会话的情况已经被记录了下来,这项特性就是ASH了,全称与视图名相同,正是:ACTIVE&nbsp;SESSION&nbsp;HISTORY。</P>
<P>  ASH 每秒钟收集一次当前处于非空闲等待事件的、活动状态的、session的信息,并保存在V$ACTIVE_SESSION_HISTORY视图中,我们(应该以及必须)知道,动态性能视图其实上是ORACLE自行构造的一堆存在于SGA内存区的虚表,就是说,ASH的数据是保存在内存里的,实际上,ORACLE分配给ASH的空间并不是无限大(更何况ORACLE自身管理的内存空间也不是无限大),查看ASH可供使用的内存空间,可以通过如下<A onclick="javascript:tagshow(event, 'SQL');" href="javascript:;" target=_self><U><STRONG><FONT color=#0000ff>SQL</FONT></STRONG></U></A>:</P>
<P>SQL&gt;&nbsp;select&nbsp;pool,&nbsp;name,&nbsp;bytes/1024/1024 &nbsp;Mb &nbsp;From&nbsp;v$sgastat&nbsp;where&nbsp;name&nbsp;like&nbsp;¨%ASH&nbsp;%¨;</P>
<P>V$ACTIVE_SESSION_HISTORY中能够记录多少会话信息, 一方面取决于该数据库的SGA 分配给ASH&nbsp;buffers的大小 ,另一方面取决于数据库的启动和关闭(重启数据库时将重构SGA内存区)。这两方面的因素制约了V$ACTIVE_SESSION_HISTORY中能够保存的会话信息的能力,做为DBA,我们肯定是希望ASH尽可能多的保留关于会话的信息,但目前来看单纯依靠V$ACTIVE_SESSION_HISTORY肯定无法实现这点,那怎么办呢?别担心,ORACLE又提供了<A onclick="javascript:tagshow(event, 'AWR');" href="javascript:;" target=_self><U><STRONG><FONT color=#0000ff>AWR</FONT></STRONG></U></A>特性,ASH收集到的会话信息,是做为AWR中快照信息的一部分,被保存到了硬盘上。</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><STRONG><FONT size=4>(二) </FONT></STRONG><U><FONT color=#000000 size=4><STRONG>AWH</STRONG></FONT></U></P>
<DIV class=article_content>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; SQLPLUS / AS SYSDBA</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; exec dbms_workload_repository.create_snapshot</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; exec:snap_id:=dbms_workload_repository.create_snapshot</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; var snap_id number</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; print snap_id</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SQL&gt; @?/rdbms/admin/awrrpt.sql</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">OracleAWR</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">速查</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">1.</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查看当前的</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">保存策略</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">select * from dba_hist_wr_control;</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">DBID,SNAP_INTERVAL,RETENTION,TOPNSQL</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">860524039,+00 01:00:00.000000,+07 00:00:00.000000,DEFAULT</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以上结果表示</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">,</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">每小时产生一个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">SNAPSHOT</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,保留</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">7</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">天</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">调整</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置都是通过</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">dbms_workload_repository</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包进行配置</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.1</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">调整</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">产生</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">snapshot</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的频率和保留策略</SPAN></STRONG><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,如:如将收集间隔时间改为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">30 </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分钟一次。并且保留</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">5</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">天时间(注:单位都是为分钟):</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec dbms_workload_repository.modify_snapshot_settings(interval=&gt;30, retention=&gt;5*24*60);</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.2</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关闭</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR,</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">把</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">interval</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设为</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">0</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">则关闭自动捕捉快照</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec dbms_workload_repository.modify_snapshot_settings(interval=&gt;0, retention=&gt;5*24*60);<STRONG style="mso-bidi-font-weight: normal"></STRONG></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN></STRONG>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.3</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">手工创建一个快照</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.4 </SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查看快照</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">select * from sys.wrh$_active_session_history</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.5</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">手工删除指定范围的快照</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE(low_snap_id =&gt; 22, high_snap_id =&gt; 32, dbid =&gt; 3310949047);</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.6</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创建</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">baseline</SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec dbms_workload_repository.create_baseline (56,59,'apply_interest_1')</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">2.7</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">删除</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">baseline</SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">exec DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE(baseline_name =&gt; ' apply_interest_1', cascade =&gt; FALSE);</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">3.</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生产</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">报告</SPAN></STRONG><STRONG style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">@$ORACLE_HOME/rdbms/admin/awrrpt.sql</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">按照脚本提示,依次选择报告类型,报告统计天数,以及开始统计,结束统计的快照编号。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如下:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">导出文件位置在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"><SPAN style="FONT-FAMILY: Times New Roman">sqlplus</SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">执行时所在目录。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>&nbsp;</P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>/rdbms/admin/awrrpr相当于以前的statspack,查看长期的<A href="javascript.:;" target=_self nclick="javascript.:tagshow(event, '%CA%FD%BE%DD%BF%E2');"><U><STRONG><FONT color=#0000ff>数据库</FONT></STRONG></U></A>情况,相对ash而言。</DIV>
<DIV>
<P>rdbms/admin/ashrpt查看当前的数据库情况,因为ash是每秒从v$session进行进行取样,awr收集的数据要比ash多得多。</P>
<P>一般收集数据库信息的话要结合awr和ash。</P>
<P>/rdbms/admin/addmrpt 相当于是驻留在oracle里的一位专家,是一个自我诊断引擎。产生symptom,problem,infomation,提供解决问题的建议,并自动修复一些具体的故障。</P>
<P>/rdbms/admin/awrinfo显示的都是awr的相关信息,包括快照信息、sysaux空间使用、awr组件、ash等信息。</P></DIV></SPAN>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=4><STRONG>(三) 另外一些详细资料</STRONG></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt"></SPAN>&nbsp;</P><SPAN lang=EN-US style="FONT-SIZE: 9pt">
<H1 style="MARGIN: 0cm 0cm 16.5pt; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">一、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">WHY</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">——为什么会出现</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">ASH</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">?</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"></SPAN></H1>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>1.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">10g</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">之前<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">用户的连接将产生会话,当前会话记录保存在<SPAN lang=EN-US style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">v$session</SPAN>中;处于等待状态的会话会被复制一份放在<SPAN lang=EN-US style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">v$session_wait</SPAN>中。当该连接断开后,其原来的连接信息在<SPAN lang=EN-US>v$session</SPAN>和<SPAN lang=EN-US>v$session_wait</SPAN>中就会被删除。这是<SPAN lang=EN-US>10g</SPAN>之前的状况。<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>2.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">v$session_wait_history</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">与<SPAN lang=EN-US>ASH</SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">若是一个普通的会话(我是指没有大量地耗费资源),则对于性能调整来说无足轻重。但若该会话在活动时大量占用了资源(比如:<SPAN lang=EN-US>CPU</SPAN>,内存,<SPAN lang=EN-US>I/O</SPAN>等),该会话信息的丢失,将无法评测当时的系统瓶颈究竟是什么。令<SPAN lang=EN-US>DBA</SPAN>高兴的是,<SPAN lang=EN-US>oracle10g</SPAN>中保留下了<SPAN lang=EN-US>v$session_wait</SPAN>中的这些信息。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">在<SPAN lang=EN-US>10g</SPAN>中新出现了一个视图:<SPAN lang=EN-US style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">v$session_wait_history</SPAN>。这个视图保存了每个活动<SPAN lang=EN-US>session</SPAN>在<SPAN lang=EN-US>v$session_wait</SPAN>中最近<SPAN lang=EN-US>10</SPAN>次的等待事件。但这对于一段时期内的数据库性能状况的监测是远远不够的,为了解决这个问题,在<SPAN lang=EN-US>10g</SPAN>中还新添加了一个视图:<SPAN lang=EN-US style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">v$active_session_history</SPAN>。这就是<STRONG><SPAN lang=EN-US>ASH</SPAN></STRONG>(<SPAN lang=EN-US>active session history</SPAN>)。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">典型的情况下<SPAN lang=EN-US>,</SPAN>为了诊断当前数据库的状态,需要最近的五到十分钟的详细信息。然而,由于记录<SPAN lang=EN-US>session</SPAN>的活动信息是很费时间和空间的,<SPAN lang=EN-US>ASH</SPAN>采用的策略是:保存处于等待状态的活动<SPAN lang=EN-US>session</SPAN>的信息,每秒从<SPAN lang=EN-US>v$session_wait</SPAN>中采样一次,并将采样信息保存在内存中。<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>3.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">AWR</SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">注意,<SPAN lang=EN-US>ASH</SPAN>的采样数据是保存在内存中。而分配给<SPAN lang=EN-US>ASH</SPAN>的内存空间是有限的,当所分配空间占满后,旧的记录就会被覆盖掉;而且数据库重启后,所有的这些<SPAN lang=EN-US>ASH</SPAN>信息都会消失。这样,对于长期检测<SPAN lang=EN-US>oracle</SPAN>的性能是不可能的。在<SPAN lang=EN-US>Oracle10g</SPAN>中,提供了永久保留<SPAN lang=EN-US>ASH</SPAN>信息的方法,这就是<STRONG><SPAN lang=EN-US>AWR</SPAN></STRONG>(<SPAN lang=EN-US>auto workload repository</SPAN>)。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">由于全部保存<SPAN lang=EN-US>ASH</SPAN>中的信息是非常耗费时间和空间的,<SPAN lang=EN-US>AWR</SPAN>采用的策略是:每小时对<SPAN lang=EN-US>v$active_session_history</SPAN>进行采样一次,并将信息保存到磁盘中,并且保留<SPAN lang=EN-US>7</SPAN>天,<SPAN lang=EN-US>7</SPAN>天后旧的记录才会被覆盖。这些采样信息被保存在视图<SPAN lang=EN-US style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0cm; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid">wrh$_active_session_history</SPAN>中。而这个采样频率(<SPAN lang=EN-US>1</SPAN>小时)和保留时间(<SPAN lang=EN-US>7</SPAN>天)是可以根据实际情况进行调整的,这就给<SPAN lang=EN-US>DBA</SPAN>们提供了更加有效的系统监测工具。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">永久地保存系统的性能诊断信息,由<SPAN lang=EN-US>SYS</SPAN>用户拥有。一段时间后,你可能想清除掉这些信息;有时候为了性能诊断,你可能需要自己定义采样频率来获取系统快照信息。<SPAN lang=EN-US>Oracle 10g</SPAN>在包<SPAN lang=EN-US>dbms_workload_repository</SPAN>中提供了很多过程,通过这些过程,你可以管理快照并设定基线<SPAN lang=EN-US>(baselines)</SPAN>。<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>4.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">小结<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">这样,我们就知道了<SPAN lang=EN-US>ASH</SPAN>和<SPAN lang=EN-US>AWR</SPAN>产生的原因和功能。<SPAN lang=EN-US>ASH</SPAN>保存了系统最新的处于等待的会话记录,可以用来诊断数据库的当前状态;而<SPAN lang=EN-US>AWR</SPAN>中的信息最长可能有<SPAN lang=EN-US>1</SPAN>小时的延迟,所以其采样信息并不能用于诊断数据库的当前状态,但可以用来作为一段时期内数据库性能调整的参考。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">对于这些视图间的继承关系,<SPAN lang=EN-US>eygle</SPAN>给出了一个关系图:</SPAN></P>
<DIV style="TEXT-ALIGN: center"><IMG alt="" src="http://blogimg.chinaunix.net/blog/upfile2/080602131706.jpg" border=0></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: center" align=center><SPAN style="LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"><SPAN style="FONT-SIZE: small"><FONT size=2>图<SPAN lang=EN-US>1 </SPAN>各个视图的层次<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"><SPAN style="FONT-SIZE: small"><FONT size=2>其中视图<SPAN lang=EN-US>dba_hist_active_sess_history</SPAN>是<SPAN lang=EN-US>wrh$_active_session_history</SPAN>和其他几个视图的联合展现,通常通过这个视图进行历史数据的访问。<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<H1 style="MARGIN: 0cm 0cm 16.5pt; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">二、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">WHAT</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">——什么是</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">?</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">现在我们稍微详细地了解一下刚才所说内容。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>1.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">ash</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">占用的内存大小<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">ASH</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的采集信息保存在内存中,在旧的信息被采样到</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">中后,可被新采集的信息覆盖,重启</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">oracle</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">后该信息被清除。分配给</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">ASH</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的内存大小可以查询到:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: justify"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select pool, name, bytes/1024/1024 From v$sgastat where name like '%ASH %';<BR><BR>POOL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NAME<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>BYTES/1024/1024<BR>------------- ------------- ---------------<BR>shared pool<SPAN>&nbsp;&nbsp; </SPAN>ASH buffers<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>2<BR><BR></FONT></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>2.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">更正<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">为了便于描述和理解,在第一部分中,我们说<SPAN lang=EN-US>AWR</SPAN>就是保存<SPAN lang=EN-US>ASH</SPAN>中的信息。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">其实,<SPAN lang=EN-US>AWR</SPAN>记录的信息不仅是<SPAN lang=EN-US>ASH</SPAN>,还可以收集到数据库运行的各方面统计信息和等待信息,用以诊断分析。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的采样方式是,以固定的时间间隔为其所有重要的统计信息和负载信息执行一次采样,并将采样信息保存在<SPAN lang=EN-US>AWR</SPAN>中。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">可以这样说:<SPAN lang=EN-US>ASH</SPAN>中的信息被保存到了<SPAN lang=EN-US>AWR</SPAN>中的视图<SPAN lang=EN-US>wrh$_active_session_history</SPAN>中。<SPAN lang=EN-US>ASH</SPAN>是<SPAN lang=EN-US>AWR</SPAN>的真子集。<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%; TEXT-ALIGN: justify"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>3.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">mmon</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">进程与<SPAN lang=EN-US>mmnl</SPAN>进程<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%; TEXT-ALIGN: justify"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">快照由一个称为<SPAN lang=EN-US> MMON </SPAN>的新的后台进程(及其从进程)以及<SPAN lang=EN-US>MMNL</SPAN>后台进程自动地每隔固定时间采样一次。</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">我们先来看一下</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">10g</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的概念指南中对这两个新增加的后台进程的介绍:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: Wingdings"><SPAN><IMG height=13 alt=* src="file:///C:/DOCUME~1/IBM/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" width=13><SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">MMON</SPAN><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">进程负责执行多种和管理相关(<SPAN lang=EN-US>manageability-related</SPAN>)的后台任务,例如:<SPAN lang=EN-US> </SPAN></SPAN></P>
<DIV style="TEXT-ALIGN: justify">
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 6.8pt; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">当某个测量值(<SPAN lang=EN-US>metrics</SPAN>)超过了预设的限定值(<SPAN lang=EN-US>threshold value</SPAN>)后提交警告<SPAN lang=EN-US> </SPAN></SPAN>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 6.8pt; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">创建新的<SPAN lang=EN-US> MMON </SPAN>隶属进程(<SPAN lang=EN-US>MMON slave process</SPAN>)来进行快照(<SPAN lang=EN-US>snapshot</SPAN>)<SPAN lang=EN-US> </SPAN></SPAN>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 6.8pt; TEXT-ALIGN: left"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">捕获最近修改过的<SPAN lang=EN-US> SQL </SPAN>对象的统计信息<SPAN lang=EN-US> </SPAN></SPAN></LI></UL></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: Wingdings"><SPAN><IMG height=13 alt=* src="file:///C:/DOCUME~1/IBM/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" width=13><SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">MMNL</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">进程负责执行轻量级的且频率较高的和可管理性相关的后台任务,例如捕获会话历史信息,测量值计算等。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的采样工作由<SPAN lang=EN-US>MMON</SPAN>进程每个<SPAN lang=EN-US>1</SPAN>小时执行一次,<SPAN lang=EN-US>ASH</SPAN>信息同样会被采样写出到<SPAN lang=EN-US>AWR</SPAN>负载库中。虽然<SPAN lang=EN-US>ASH buffer</SPAN>被设计为保留<SPAN lang=EN-US>1</SPAN>小时的信息,但很多时候这个内存是不够的,当<SPAN lang=EN-US>ASH buffer</SPAN>写满后,另外一个后台进程<SPAN lang=EN-US>MMNL</SPAN>将会主动将<SPAN lang=EN-US>ASH</SPAN>信息写出。</SPAN><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>4.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">SYSAUX</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">表空间<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">这些采样数据都存储在<SPAN lang=EN-US>SYSAUX</SPAN>表空间中,并且以<SPAN lang=EN-US>WRM$_* </SPAN>和<SPAN lang=EN-US> WRH$_*</SPAN>的格式命名。前一种类型存储元数据信息(如检查的数据库和采集的快照),后一种类型保存实际采集的统计数据。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select table_name from dba_tables where table_name like 'WRM$%';</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>TABLE_NAME</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>-----------------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>WRM$_WR_CONTROL</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>WRM$_SNAP_ERROR</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>WRM$_SNAPSHOT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>WRM$_DATABASE_INSTANCE</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">WRM$_BASELINE</SPAN><SPAN lang=EN-US style="LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">当</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">SYSAUX</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">表空间满后,</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">将自动覆盖掉旧的信息,并在警告日志中记录一条相关信息:</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>ORA-1688: unable to extend table SYS.WRH$_ACTIVE_SESSION_HISTORY partition WRH$_ACTIVE_3533490838_1522 by 128 in<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>tablespace SYSAUX</FONT></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>5.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">采样频率和保留时间<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">可以通过查询视图</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">dba_hist_wr_control</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">或(</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">wrm$_wr_control</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">)来查询</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的采样频率和保留时间。默认为每</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">1</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">小时采样一次,采样信息保留时间为</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">7</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">天。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left" align=left><SPAN style="FONT-SIZE: small"><SPAN style="FONT-FAMILY: Times New Roman"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: #d4d0c8 0% 50%; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">SQL&gt; select * from dba_hist_wr_control;</SPAN><SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left" align=left><SPAN lang=EN-US><SPAN style="FONT-SIZE: small"><SPAN style="FONT-FAMILY: Times New Roman"></SPAN></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="BACKGROUND: #d4d0c8 0% 50%; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><SPAN style="FONT-FAMILY: Times New Roman"><FONT size=2>DBID SNAP_INTERVAL RETENTION&nbsp;&nbsp; TOPNSQL<BR>---- ------------- ----------- ----------<BR>1148 +00000 <SPAN style="COLOR: red">00:1</SPAN>&nbsp;&nbsp; +<SPAN style="COLOR: red">00007 00:0</SPAN> DEFAULT</FONT></SPAN></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="BACKGROUND: #d4d0c8 0% 50%; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small; FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="BACKGROUND: #d4d0c8 0% 50%; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><SPAN style="FONT-FAMILY: Times New Roman"><FONT size=2>SQL&gt; select DBID, SNAP_INTERVAL, SNAPINT_NUM, RETENTION from wrm$_wr_control;<BR><BR><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID SNAP_INTERVAL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>SNAPINT_NUM RETENTION<BR>---------- ------------------ ----------- --------------------<BR>1160732652 +00000 01:00:00.0<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>3600 +00007 00:00:00.0</FONT></SPAN></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="FONT-SIZE: small; FONT-FAMILY: Times New Roman"></SPAN></SPAN>&nbsp;</P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>6.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">采样数据量<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">由于数据量巨大,把所有</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">ASH</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">数据写到磁盘上是不可接受的。一般是在写到磁盘的时候过滤这个数据,写出的数据占采样数据的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">10%</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">,写出时通过</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN style="FONT-FAMILY: Times New Roman">direct-path insert</SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">完成,尽量减少日志生成,从而最小化数据库性能的影响。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>7.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">初始化参数<SPAN lang=EN-US>statistics_level</SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">的行为受到参数<SPAN lang=EN-US>STATISTICS_LEVEL</SPAN>的影响。这个参数有三个值:<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: Wingdings"><SPAN><IMG height=13 alt=* src="file:///C:/DOCUME~1/IBM/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" width=13><SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">BASIC</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">:<SPAN lang=EN-US>awr</SPAN>统计的计算和衍生值关闭<SPAN lang=EN-US>.</SPAN>只收集少量的数据库统计信息<SPAN lang=EN-US>.</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: Wingdings"><SPAN><IMG height=13 alt=* src="file:///C:/DOCUME~1/IBM/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" width=13><SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">TYPICAL</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">:默认值.只有部分的统计收集<SPAN lang=EN-US>.</SPAN>他们代表需要的典型监控<SPAN lang=EN-US>oracle</SPAN>数据库的行为<SPAN lang=EN-US>.</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: Wingdings"><SPAN><IMG height=13 alt=* src="file:///C:/DOCUME~1/IBM/LOCALS~1/Temp/msohtml1/01/clip_image001.gif" width=13><SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">ALL : </SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">所有可能的统计都被捕捉<SPAN lang=EN-US>. </SPAN>并且有操作系统的一些信息<SPAN lang=EN-US>.</SPAN>这个级别的捕捉应该在很少的情况下<SPAN lang=EN-US>,</SPAN>比如你要更多的<SPAN lang=EN-US>sql</SPAN>诊断信息的时候才使用<SPAN lang=EN-US>.</SPAN></SPAN></P>
<H1 style="MARGIN: 0cm 0cm 16.5pt"><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">三、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">HOW</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">——如何使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"><SPAN style="FONT-FAMILY: Times New Roman">AWR</SPAN></SPAN><SPAN style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%; FONT-FAMILY: 宋体">?</SPAN><SPAN lang=EN-US style="FONT-SIZE: 14pt; LINE-HEIGHT: 240%"></SPAN></H1>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">AWR</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">由<SPAN lang=EN-US>ORACLE</SPAN>自动产生,但是也可以通过<SPAN lang=EN-US>DBMS_WORKLOAD_REPOSITORY</SPAN>包来手工创建、删除和修改。可以使用<SPAN lang=EN-US>desc</SPAN>命令查看该包中的过程。下面只介绍几个常用的:<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>1.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">手工创建一个快照<SPAN lang=EN-US></SPAN></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select count(*) from wrh$_active_session_history;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>COUNT(*)</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>----------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>317</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; begin</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>2<SPAN>&nbsp; </SPAN>dbms_workload_repository.create_snapshot();</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>3<SPAN>&nbsp; </SPAN>end;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>4<SPAN>&nbsp; </SPAN>/</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select count(*) from wrh$_active_session_history;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>COUNT(*)</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>----------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>320</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"></SPAN>&nbsp;</P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>2.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">手工删除指定范围的快照</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select * from wrh$_active_session_history where snap_id = 96;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp; </SPAN>SNAP_ID<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID INSTANCE_NUMBER<SPAN>&nbsp; </SPAN>SAMPLE_ID SAMPLE_TIME</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ---------- --------------- ---------- ----------------------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>96 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>236930 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.26.04.562 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>96 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>236930 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.26.04.562 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>96 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>236930 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.26.04.562 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; begin</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>2<SPAN>&nbsp; </SPAN>dbms_workload_repository.drop_snapshot_range(low_snap_id =&gt; 96, high_snap_id =&gt; 96, dbid =&gt; 1160732652);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>3<SPAN>&nbsp; </SPAN>end;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp; </SPAN>4<SPAN>&nbsp; </SPAN>/</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select * from wrh$_active_session_history where snap_id = 96;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">未选定行</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体"></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"></SPAN>&nbsp;</P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>3.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">修改采集时间和统计信息保留时间</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"></SPAN></H2>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>PROCEDURE MODIFY_SNAPSHOT_SETTINGS</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>参数名称<SPAN lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>类型<SPAN lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN>输入<SPAN lang=EN-US>/</SPAN>输出默认值<SPAN lang=EN-US>?</SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>------------------------------ ----------------------- ------ --------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;</SPAN>RETENTION<SPAN>&nbsp;&nbsp;&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>NUMBER<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>IN<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;</SPAN>INTERVAL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NUMBER<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>IN<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;</SPAN>TOPNSQL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NUMBER<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>IN<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;</SPAN>DBID<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>NUMBER<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>IN<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 宋体"></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 4.1pt 0cm 6.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体">通过修改<SPAN lang=EN-US>retention</SPAN>参数可以修改<SPAN lang=EN-US>awr</SPAN>信息的保留期限。默认的是七天<SPAN lang=EN-US>,</SPAN>最小的值是一天。如果把<SPAN lang=EN-US>retention</SPAN>设置为零<SPAN lang=EN-US>,</SPAN>自动清除就关闭了<SPAN lang=EN-US>.</SPAN>如果<SPAN lang=EN-US>awr</SPAN>发现<SPAN lang=EN-US>sysaux</SPAN>空间不够<SPAN lang=EN-US>,</SPAN>它通过删除那些最老部分的快照来重新使用这些空间<SPAN lang=EN-US>.</SPAN>同时<SPAN lang=EN-US>,</SPAN>也会给<SPAN lang=EN-US>dba</SPAN>发一条警告<SPAN lang=EN-US>,</SPAN>告诉<SPAN lang=EN-US>sysaux</SPAN>空间不够了(在警告日志中)<SPAN lang=EN-US>.</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">通过修改<SPAN lang=EN-US>interval</SPAN>参数可以修改<SPAN lang=EN-US>awr</SPAN>信息的采样频率。最小的值是<SPAN lang=EN-US>10</SPAN>分钟<SPAN lang=EN-US>,</SPAN>默认的是<SPAN lang=EN-US>60</SPAN>分钟<SPAN lang=EN-US>.</SPAN>典型的值是<SPAN lang=EN-US>10,20,30,60,120</SPAN>等等。把<SPAN lang=EN-US>interval</SPAN>设为<SPAN lang=EN-US>0</SPAN>则关闭自动捕捉快照<SPAN lang=EN-US>.</SPAN>如将收集间隔时间改为<SPAN lang=EN-US>30 </SPAN>分钟一次。并且保留<SPAN lang=EN-US>5</SPAN>天时间(注:单位都是为分钟):<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *from dba_hist_wr_control;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID SNAP_INTERVAL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RETENTION<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>TOPNSQL</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ------------------ -------------------------- -----------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>1160732652 +00000 <SPAN style="COLOR: red">01:00</SPAN>:00.0<SPAN>&nbsp; </SPAN>+0000<SPAN style="COLOR: red">7</SPAN> 00:00:00.0<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; exec dbms_workload_repository.modify_snapshot_settings(interval=&gt;30, retention=&gt;5*24*60);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; SELECT *from dba_hist_wr_control;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID SNAP_INTERVAL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>RETENTION<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>TOPNSQL</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ------------------- ------------------------- -----------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>1160732652 +00000 <SPAN style="COLOR: red">00:30</SPAN>:00.0<SPAN>&nbsp;&nbsp; </SPAN>+0000<SPAN style="COLOR: red">5</SPAN> 00:00:00.0<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DEFAULT</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt;</FONT></SPAN></SPAN></P>
<P><SPAN style="LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"><SPAN style="FONT-SIZE: small"><SPAN lang=EN-US>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>4.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">设置基线</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"></SPAN></H2>
<P class=MsoNormal style="BACKGROUND: white 0% 50%; MARGIN: 4.1pt 0cm 6.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial" align=left><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体">基线(<SPAN lang=EN-US>baseline</SPAN>)是一种机制<SPAN lang=EN-US>,</SPAN>这样你可以在重要时间的快照信息集做标记。一个基线定义在一对快照之间<SPAN lang=EN-US>,</SPAN>快照通过他们的快照序列号识别<SPAN lang=EN-US>.</SPAN>每个基线有且只有一对快照。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">一次典型的性能调整实践从采集量度的基准线集合、作出改动、然后采集另一个基准线集合开始。可以比较这两个集合来检查所作的改动的效果。在<SPAN lang=EN-US> AWR </SPAN>中,对现有的已采集的快照可以执行相同类型的比较。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">假定一个名称为<SPAN lang=EN-US> apply_interest </SPAN>的高度资源密集的进程在下午<SPAN lang=EN-US> 1:00 </SPAN>到<SPAN lang=EN-US> 3:00 </SPAN>之间运行,对应快照<SPAN lang=EN-US> ID 95 </SPAN>到 <SPAN lang=EN-US>98</SPAN>。我们可以为这些快照定义一个名称为<SPAN lang=EN-US> apply_interest_1 </SPAN>的基准线:<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *From dba_hist_baseline;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>未选定行<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select * from wrm$_baseline;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>未选定行<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; exec dbms_workload_repository.create_baseline(95, 98, 'apply_interest_1');</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 10.5pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">这一操作将快照从 <SPAN lang=EN-US>95 </SPAN>到<SPAN lang=EN-US> 98 </SPAN>编号,作为上面指定的基准线的一部分。查看现有的基准线:<SPAN lang=EN-US> </SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *from dba_hist_baseline;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID BASELINE_ID BASELINE_NAME<SPAN>&nbsp;&nbsp;&nbsp; </SPAN><SPAN>&nbsp;</SPAN>START_SNAP_ID START_SNAP_TIME<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>END_SNAP_ID END_SNAP_TIME</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ----------- ------------------------- ------------- ------------------------------------- ----------- ------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1 apply_interest_1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.00.05.375 </SPAN>上午<SPAN lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 06-10</SPAN>月<SPAN lang=EN-US>-07 01.44.58.062 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *from wrm$_baseline;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID BASELINE_ID BASELINE_NAME<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>START_SNAP_ID END_SNAP_ID</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ----------- ---------------------------- ------------- -----------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>1160732652<SPAN>&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>1 apply_interest_1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体"></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">在一些调整步骤之后,我们可以创建另一个基准线 — 假设名称为<SPAN lang=EN-US> apply_interest_2</SPAN>,然后只为那些与这两条基准线相关的快照比较量度。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; exec dbms_workload_repository.create_baseline(92, 94, 'apply_interest_2');</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">像这样把快照分隔在仅仅几个集合中有助于研究调整对于性能量度的影响。您可以在分析之后使用<SPAN lang=EN-US> drop_baseline() </SPAN>来删除基准线;快照将保留(也可级联删除)。此外,当清除例程开始删除旧的快照时,与基准线相关的快照不会被清除,从而允许进行进一步的分析。<SPAN lang=EN-US></SPAN></SPAN></P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>5.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">删除基线</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">如果要删除一个基准线<SPAN lang=EN-US>:</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; exec dbms_workload_repository.drop_baseline(baseline_name=&gt;'apply_interest_1', <SPAN style="COLOR: red">cascade=&gt;false</SPAN>);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *from wrh$_active_session_history where snap_id in (95,96,97,98);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp; </SPAN>SNAP_ID<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID INSTANCE_NUMBER<SPAN>&nbsp; </SPAN>SAMPLE_ID SAMPLE_TIME</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ---------- --------------- ---------- -------------------------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>235360 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 10.56.29.872 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>235230 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 10.54.19.857 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>233130 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 10.19.19.478 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>232830 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 10.14.18.859 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;</SPAN>95 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>232250 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 10.04.38.481 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238600 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 12.33.08.420 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp; </SPAN>SNAP_ID<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DBID INSTANCE_NUMBER<SPAN>&nbsp; </SPAN>SAMPLE_ID SAMPLE_TIME</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>---------- ---------- --------------- ---------- -------------------------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238420 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.50.55.686 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>238230 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 11.47.45.687 </SPAN>上午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239140 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.42.00.976 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239140 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.42.00.976 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239140 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.42.00.976 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239140 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.42.00.976 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239140 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.42.00.976 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239130 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.27.04.161 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239130 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.27.04.161 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>239130 06-10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US>-07 01.27.04.161 </SPAN>下午<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>已选择<SPAN lang=EN-US>21</SPAN>行。<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; exec dbms_workload_repository.drop_baseline(baseline_name=&gt;'apply_interest_2', <SPAN style="COLOR: red">cascade=&gt;true</SPAN>);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">PL/SQL </SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">过程已成功完成。<SPAN lang=EN-US></SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; select *from wrh$_active_session_history where snap_id in (92,93,94);</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>未选定行<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<H2 style="MARGIN: 0cm 0cm 3.1pt 21pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 172%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"><SPAN>6.<SPAN style="FONT: 7pt 'Times New Roman'; font-size-adjust: none; font-stretch: normal">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体">生成报表</SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 172%; FONT-FAMILY: 宋体"></SPAN></H2>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">awr</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">有个报表生成机制<SPAN lang=EN-US>,</SPAN>可以对存储在<SPAN lang=EN-US>workload</SPAN>资料库的统计产生汇总报表。这个分析对一段时间的统计做的。这个报表生成机制很像<SPAN lang=EN-US>statspack</SPAN>。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: left" align=left><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">可以使用脚本<SPAN lang=EN-US>awrrpt.sql</SPAN>或<SPAN lang=EN-US>awrrpti.sql</SPAN>来查看<SPAN lang=EN-US>AWR</SPAN>报告(非常类似<SPAN lang=EN-US>statspack</SPAN>中的<SPAN lang=EN-US>spreport.sql</SPAN>),这两个脚本都在目录<SPAN lang=EN-US>$ORACLE_HOME/rdbms/admin</SPAN>中。<SPAN lang=EN-US>Awrrpt.sql</SPAN>脚本可以显示指定快照<SPAN lang=EN-US>id</SPAN>范围的诊断信息,报告可以保存为文本文件或<SPAN lang=EN-US>HTML</SPAN>文件;<SPAN lang=EN-US>awrrpti.sql</SPAN>脚本与<SPAN lang=EN-US>awrrpt.sql</SPAN>类似,唯一的不同就是在<SPAN lang=EN-US>awrrpti.sql</SPAN>脚本中,你可以指定数据库<SPAN lang=EN-US>ID</SPAN>和实例<SPAN lang=EN-US>ID</SPAN>(作为参数)。报告包括如下诊断信息:<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; LINE-HEIGHT: 125%; TEXT-ALIGN: left" align=left><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%"><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN><SPAN style="FONT-FAMILY: Times New Roman"> Report summary<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Wait events statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> SQL statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Instance activity statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> I/O statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Buffer pool statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Advisory statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Wait statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Undo statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Latch statistics<BR><SPAN>&nbsp;</SPAN>Segment statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Dictionary cache statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Library cache statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> SGA statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> Resource limit statistics<BR><SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"></SPAN></SPAN> init.ora parameters</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">通过运行<SPAN lang=EN-US>$ORACLE_HOME/rdbms/admin</SPAN>目录中的<SPAN lang=EN-US>awrrpt.sql</SPAN>脚本,<SPAN lang=EN-US>AWR</SPAN>的功能可以立即通过它从采集的统计数据和量度中生成的报表得到最好的说明。这个脚本显示所有的现有<SPAN lang=EN-US>AWR</SPAN>快照并请求两个特定的快照作为时间间隔边界。它产生两种类型的输出:文本格式(类似于<SPAN lang=EN-US>Statspack</SPAN>报表的文本格式但来自于<SPAN lang=EN-US>AWR</SPAN>信息库)和默认的<SPAN lang=EN-US>HTML</SPAN>格式(拥有到部分和子部分的所有超链接),从而提供了非常用户友好的报表。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">运行这个脚本必须要<SPAN lang=EN-US>select any dictionary</SPAN>权限<SPAN lang=EN-US>.</SPAN>这个脚本提示你输入选项如怎么和在哪里生成这个报表<SPAN lang=EN-US>:</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt 21pt; LINE-HEIGHT: 125%"><SPAN lang=EN-US style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">*</SPAN><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">首先<SPAN lang=EN-US>,</SPAN>你需要指明你要生成<SPAN lang=EN-US>html</SPAN>还是<SPAN lang=EN-US>text</SPAN>格式的<SPAN lang=EN-US><BR>*</SPAN>要选择快照的天数<SPAN lang=EN-US>:</SPAN>输入天数<SPAN lang=EN-US>,</SPAN>和你最近的快照<SPAN lang=EN-US>,</SPAN>可选的<SPAN lang=EN-US>,</SPAN>你可以使用<SPAN lang=EN-US>dba_hist_snapshot</SPAN>表来看你要用哪个<SPAN lang=EN-US>snap_id.<BR>*</SPAN>开始<SPAN lang=EN-US>snap_id</SPAN>和终止<SPAN lang=EN-US>snap_id,</SPAN>这个快照对定义你的报表产生的时间间隔<SPAN lang=EN-US>.<BR>*</SPAN>文件名称<SPAN lang=EN-US>,</SPAN>报告写的用户指定的文件<SPAN lang=EN-US>.</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 7.8pt; LINE-HEIGHT: 125%"><SPAN style="FONT-SIZE: 12pt; LINE-HEIGHT: 125%; FONT-FAMILY: 宋体">现在运行该脚本以查看报表,从而对<SPAN lang=EN-US>AWR</SPAN>的报表功能有一个直观的了解。<SPAN lang=EN-US></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt; @D:/oracle/product/10.2.0/db_1/RDBMS/ADMIN/awrrpt.sql</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Current Instance</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp; </SPAN>DB Id<SPAN>&nbsp;&nbsp;&nbsp; </SPAN>DB Name<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Inst Num Instance</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>----------- ------------ -------- ------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;</SPAN>1160732652 ORCL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1 orcl</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Specify the Report Type</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Would you like an HTML report, or a plain text report?</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Enter 'html' for an HTML report, or 'text' for plain text</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Defaults to 'html'</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>输入<SPAN lang=EN-US> report_type </SPAN>的值<SPAN lang=EN-US>:</SPAN></FONT></SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Type Specified:<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>html</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Instances in this Workload Repository schema</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp; </SPAN>DB Id<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Inst Num DB Name<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Instance<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Host</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>------------ -------- ------------ ------------ ------------</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>* 1160732652<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1 ORCL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>orcl<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>YUECHAOTIAN</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Using 1160732652 for database Id</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Using<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1 for instance number</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Specify the number of days of snapshots to choose from</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Entering the number of days (n) will result in the most recent</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>(n) days of snapshots being listed.<SPAN>&nbsp; </SPAN>Pressing &lt;return&gt; without</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>specifying a number lists all completed snapshots.</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>输入<SPAN lang=EN-US> num_days </SPAN>的值<SPAN lang=EN-US>:<SPAN>&nbsp; </SPAN>4</SPAN></FONT></SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Listing the last 4 days of Completed Snapshots</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Snap</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Instance<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>DB Name<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Snap Id<SPAN>&nbsp;&nbsp;&nbsp; </SPAN>Snap Started<SPAN>&nbsp;&nbsp;&nbsp; </SPAN>Level</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>------------ ------------ --------- ------------------ -----</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">orcl<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>ORCL<SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>81 04 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 07:24<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>83 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 13:34<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>84 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 16:19<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>85 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 17:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>86 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 18:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>87 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 19:10<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>88 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 20:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>89 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 21:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>90 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 22:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>91 05 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 23:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 11:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 13:27<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>98 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 13:44<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>99 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 14:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>100 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 14:30<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>101 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 15:00<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: small"><FONT size=2><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>102 06 10</SPAN><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial">月<SPAN lang=EN-US> 2007 15:30<SPAN>&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1</SPAN></SPAN></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Specify the Begin and End Snapshot Ids</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>输入<SPAN lang=EN-US> begin_snap </SPAN>的值<SPAN lang=EN-US>:<SPAN>&nbsp; </SPAN>100</SPAN></FONT></SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Begin Snapshot Id specified: 100</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>输入<SPAN lang=EN-US> end_snap </SPAN>的值<SPAN lang=EN-US>:<SPAN>&nbsp; </SPAN>102</SPAN></FONT></SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>End<SPAN>&nbsp;&nbsp; </SPAN>Snapshot Id specified: 102</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Specify the Report Name</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>~~~~~~~~~~~~~~~~~~~~~~~</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>The default report file name is awrrpt_1_100_102.html.<SPAN>&nbsp; </SPAN>To use this name,</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>press &lt;return&gt; to continue, otherwise enter an alternative.</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>输入<SPAN lang=EN-US> report_name </SPAN>的值<SPAN lang=EN-US>:</SPAN></FONT></SPAN></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Using the report name awrrpt_1_100_102.html</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"></SPAN></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;AWR Report&lt;/TITLE&gt;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>……(省略结果)<SPAN lang=EN-US></SPAN></FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>End of Report</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>&lt;/BODY&gt;&lt;/HTML&gt;</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>Report written to awrrpt_1_100_102.html</FONT></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="BACKGROUND: silver 0% 50%; FONT-FAMILY: 宋体; moz-background-clip: -moz-initial; moz-background-origin: -moz-initial; moz-background-inline-policy: -moz-initial"><SPAN style="FONT-SIZE: small"><FONT size=2>SQL&gt;</FONT></SPAN></SPAN></P></SPAN></SPAN></SPAN></SPAN></DIV></DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<P>AWR报告的主要内容包括以下几部分:</P>
<P><STRONG>前言部分:</STRONG>这是AWR报告的第一段,用于描述环境包括数据库名,数据库版本,是否为RAC节点,快照报告的采集时间等。</P>
<P><STRONG>综述部分:</STRONG>包含等待事件段,Load Profile段,实例效率统计段,Shared Pool统计段,Cache Size段,其中最重要的是等待事件段,它告诉我们在快照时间内数据库遇到哪些性能瓶颈,它们将是性能调整或问题诊断的主要候选对象。以下Top Time Event数据摘自我的数据库产生的AWR报告。</P>
<P>
<TABLE style="WIDTH: 450px" cellSpacing=0 cellPadding=0 width=450 align=center border=1>
<TBODY>
<TR>
<TD>
<DIV align=center><STRONG>Event</STRONG><STRONG></STRONG></DIV></TD>
<TD>
<DIV align=center><STRONG>Waits</STRONG><STRONG></STRONG></DIV></TD>
<TD>
<DIV align=center><STRONG>Time(s)</STRONG><STRONG></STRONG></DIV></TD>
<TD>
<DIV align=center><STRONG>Avg Wait(ms)</STRONG><STRONG></STRONG></DIV></TD>
<TD>
<DIV align=center><STRONG>% Total Call Time</STRONG><STRONG></STRONG></DIV></TD>
<TD>
<DIV align=center><STRONG>Wait Class</STRONG><STRONG></STRONG></DIV></TD></TR>
<TR>
<TD vAlign=top>
<DIV>CPU time</DIV></TD>
<TD vAlign=top>
<DIV align=right>&nbsp;</DIV></TD>
<TD vAlign=top>
<DIV align=right>17,306</DIV></TD>
<TD vAlign=top>
<DIV align=right>&nbsp;</DIV></TD>
<TD vAlign=top>
<DIV align=right>99.6</DIV></TD>
<TD vAlign=top>
<DIV>&nbsp;</DIV></TD></TR>
<TR>
<TD vAlign=top>
<DIV>db file scattered read</DIV></TD>
<TD vAlign=top>
<DIV align=right>19,469,037</DIV></TD>
<TD vAlign=top>
<DIV align=right>4,448</DIV></TD>
<TD vAlign=top>
<DIV align=right>0</DIV></TD>
<TD vAlign=top>
<DIV align=right>25.6</DIV></TD>
<TD vAlign=top>
<DIV>User I/O</DIV></TD></TR>
<TR>
<TD vAlign=top>
<DIV>log file parallel write</DIV></TD>
<TD vAlign=top>
<DIV align=right>492,258</DIV></TD>
<TD vAlign=top>
<DIV align=right>221</DIV></TD>
<TD vAlign=top>
<DIV align=right>0</DIV></TD>
<TD vAlign=top>
<DIV align=right>1.3</DIV></TD>
<TD vAlign=top>
<DIV>System I/O</DIV></TD></TR>
<TR>
<TD vAlign=top>
<DIV>log file sync</DIV></TD>
<TD vAlign=top>
<DIV align=right>253,519</DIV></TD>
<TD vAlign=top>
<DIV align=right>143</DIV></TD>
<TD vAlign=top>
<DIV align=right>1</DIV></TD>
<TD vAlign=top>
<DIV align=right>.8</DIV></TD>
<TD vAlign=top>
<DIV>Commit</DIV></TD></TR>
<TR>
<TD vAlign=top>
<DIV>read by other session</DIV></TD>
<TD vAlign=top>
<DIV align=right>421,942</DIV></TD>
<TD vAlign=top>
<DIV align=right>73</DIV></TD>
<TD vAlign=top>
<DIV align=right>0</DIV></TD>
<TD vAlign=top>
<DIV align=right>.4</DIV></TD>
<TD vAlign=top>
<DIV>User I/O</DIV></TD></TR></TBODY></TABLE></P>
<P>报告显示“db file scattered read”是这个快照时间内最重要的等待事件,这种等待是由于会话在等待一个“multiblock IO”的完成,通常这是由于在大表上执行全表扫描或索引快速扫描引起。接下来可以查看哪些SQL执行这些查询,查询操作集中在哪些表上,检查SQL PLAN看是否使用了索引。</P>
<P><STRONG>SQL部分</STRONG>:无效的SQL语句是性能不好的主要原因,这部分对这段时间区间内的SQL按照执行时间,逻辑读,磁盘读等指标进行了分类和排序,和STATSPACK不同的是,从AWR报告中可以直接查到该SQL的文本和发送请求的客户端进程信息,极大的提高了SQL分析的效率。</P>
<P><STRONG>实例活动统计部分</STRONG>:这部分是快照期间,对实例的各个内部模块的活动和各种资源使用情况的统计,主要包括CPU使用情况,SQL*Net消息,链接的行存取和PGA使用情况。</P>
<P><STRONG>段统计部分</STRONG>:告诉哪些段(包括表和索引)在快照期间经历最高的磁盘读操作,这些信息可以帮助我们决定是否需要重建索引,或对段进行分区来减少发生在这些数据文件上的I/O。</P>
<P>AWR的一些常用操作主要包括:</P>
<P>修改快照的收集和保存时间,创建Baseline,导出并迁移AWR数据。下面介绍一下这些功能使用方法。</P>
<P>默认情况下,AWR每隔1小时自动收集一个系统负载快照,并且此快照默认保存一周。但Oracle 10g提供以下命令可以修改快照收集时间间隔和保存时间。</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE><P>execute dbms_workload_repository.modify_snapshot_settings(interval =&gt; 120,</P><P>retention =&gt; 20160);</P></PRE></TD></TR></TBODY></TABLE></P>
<P>上述命令修改快照的收集间隔为2小时,保存时间为两周。</P>
<P>可以为AWR数据创建baseline,保存这些数据用于将来分析和比较。具体命令如下,</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE><P>execute dbms_workload_repository.create_baseline (start_snap_id =&gt;1,</P><P>end_snap_id =&gt;100, baseline_name =&gt; 'baseline name', dbid =&gt; yourdbid);</P></PRE></TD></TR></TBODY></TABLE></P>
<P>可以将AWR数据导出并迁移到其它数据库以便于以后分析。Oracle10g Release2提供两个新工具来完成导出和迁移。AWR数据的工作。</P>
<P>DBMS_SWRF_INTERNAL.AWR_EXTRACT用来导出数据,其使用方法如下:</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE><P>Begin<BR>&nbsp;&nbsp;&nbsp;&nbsp; DBMS_SWRF_INTERNAL.AWR_EXTRACT (<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmpfile&nbsp;&nbsp; =&gt; 'awr_data.dmp',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmpdir&nbsp;&nbsp;&nbsp; =&gt; 'TMP_DIR',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; 302,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; 305);<BR>end;</P></PRE></TD></TR></TBODY></TABLE></P>
<P>其中,dmpfile参数用于指定将要导出的AWR数据文件的名字,dmpdir是指定存放导出文件的目录路径,bid是起始快照编号,eid是结束快照编号。</P>
<P>DBMS_SWRF_INTERNAL用来迁移AWR数据文件到其他数据库。导入AWR数据的过程分为两个步骤,首先使用DBMS_SWRF_INTERNAL.AWR_LOAD方法把数据导入到一个临时模式中,本例是AWR_TEST(也可以自己定义名称),具体方法如下:</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE><P>begin<BR>&nbsp;&nbsp;&nbsp; DBMS_SWRF_INTERNAL.AWR_LOAD (<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCHNAME =&gt; 'AWR_TEST',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmpfile =&gt; 'awr_data',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmpdir =&gt;&nbsp; 'TMP_DIR');<BR>end;</P></PRE></TD></TR></TBODY></TABLE></P>
<P>接下来把需要把AWR数据转移到SYS模式中,操作方法如下:</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE><P>exec DBMS_SWRF_INTERNAL.MOVE_TO_AWR (SCHNAME =&gt; 'TEST');</P></PRE></TD></TR></TBODY></TABLE></P>
<P>这样AWR数据的导入工作已经完成,现在可以使用这种方法建立一个专门存放AWR数据的数据库,用于集中管理和分析多个数据库实例的性能统计数据。</P></DIV>
页: [1]
查看完整版本: ORACLE ASH/AWR