手动生成AWR报告

来源:互联网 发布:哈曼卡顿和惠威 知乎 编辑:程序博客网 时间:2024/06/10 16:40

AWR是在10G开始引入的,在以前可以使用Statspack;AWR的前身就是Statspack;

手动生成AWR报告,可以使用$ORACLE_HOME/rdbms/admin/awrrpt.sql;linux貌似是在dbs目录

(1)用管理员账号登陆,sys

(2)所选快照距离现在的天数

(3)生成报表的起始快照编号

(4)生成报表的结束快照编号

(5)输入报表名称

--首先用sys登陆,可以去服务端登陆、也可以在客户端登陆、这里用的客户端--windows在rdbms目录;linux貌似在dbs目录SQL> @\\192.168.1.6\f$\oracle\product\10.2.0\db_1\RDBMS\ADMIN\awrrpt.sqlCurrent Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------ 1346908926 ORCL                1 orclSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter 'html' for an HTML report, or 'text' for plain textDefaults to 'html'输入 report_type 的值:html---这里输出html格式的数据Type Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------* 1346908926        1 ORCL         orcl         SYOA20130626Using 1346908926 for database IdUsing          1 for instance numberSpecify the number of days of snapshots to choose from~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Entering the number of days (n) will result in the most recent(n) days of snapshots being listed.  Pressing <return> withoutspecifying a number lists all completed snapshots.--这里显示最近7天的快照信息输入 num_days 的值:7<<中间会显示一些快照信息、这里省略........>>Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--输入开始快照ID;可以从上面省略的输出信息查看输入 begin_snap 的值:  547Begin Snapshot Id specifie--输入结束快照ID;可以从上面省略的输出信息查看输入 end_snap 的值:  703Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is awrrpt_1_547_703.html.  To use this name,press <return> to continue, otherwise enter an alternative.--输入保存的文件路径;如果采用的客户端登陆,就写客户端的路径;否则就写服务端的路径输入 report_name 的值:C:\123456.html

--------------------------------------------下面是输出的示例报告--------------------------------------------------------------------------------------

0 0
原创粉丝点击