oracle打印awr报告,oracle生成awr报告

1.先获取到两次AWR快照的ID

SQL> select snap_id from (SELECT * FROM dba_hist_snapshot ORDER BY snap_id desc) where rownum <= 2;

da0c1386835859.jpg

2.进入$ORACLE_HOME/rdbms/admin目录,在sqlplus下运行@

[[email protected] ~]$ cd $ORACLE_HOME/rdbms/admin

[[email protected] admin]$ pwd

/u01/app/[email protected] admin]$ sqlplus / as sysdba

SQL>  select snap_id from (SELECT * FROM dba_hist_snapshot ORDER BY snap_id desc) where rownum <= 2;

SNAP_ID

----------

12990

12989

SQL> @awrrpt

Current Instance

~~~~~~~~~~~~~~~~

DB Id    DB Name  Inst Num Instance

----------- ------------ -------- ------------

1250833090 DL   1 DL

Specify the Report Type

~~~~~~~~~~~~~~~~~~~~~~~

Would you like an HTML report, or a plain text report?

Enter ’html’ for an HTML report, or ’text’ for plain text

Defaults to ’html’

输入 report_type 的值:  html

Type Specified:  html

Instances in this Workload Repository schema

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DB Id     Inst Num DB Name    Instance Host

------------ -------- ------------ ------------ ------------

* 1250833090     1 DL    DL  oraclemaster

1250833090     1 DL    DL  oracleslave

Using 1250833090 for database Id

Using        1 for instance number

Specify 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 without

specifying a number lists all completed snapshots.

输入 num_days 的值:  1

Listing the last day’s Completed Snapshots

Snap

Instance     DB Name     Snap Id    Snap Started    Level

------------ ------------ --------- ------------------ -----

DL           DL               12974 12 12月 2013 00:00     1

12975 12 12月 2013 01:00     1

12976 12 12月 2013 02:00     1

12977 12 12月 2013 03:00     1

12978 12 12月 2013 04:00     1

12979 12 12月 2013 05:00     1

12980 12 12月 2013 06:00     1

12981 12 12月 2013 07:00     1

12982 12 12月 2013 08:00     1

12983 12 12月 2013 09:00     1

12984 12 12月 2013 10:00     1

12985 12 12月 2013 11:00     1

12986 12 12月 2013 12:00     1

12987 12 12月 2013 13:00     1

12988 12 12月 2013 14:00     1

12989 12 12月 2013 15:00     1

12990 12 12月 2013 16:00     1

Specify the Begin and End Snapshot Ids

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

输入 begin_snap 的值:  12989

Begin Snapshot Id specified: 12989

输入 end_snap 的值:  12990

End   Snapshot Id specified: 12990

Specify the Report Name

~~~~~~~~~~~~~~~~~~~~~~~

The default report file name is awrrpt_1_12989_12990.html.  To use this name,

press to continue, otherwise enter an alternative.

输入 report_name 的值:  /

生成的文件在 /

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值