在RAC环境中,数据库的采样报告包含了两个实例的采样数据,可以通过awrddrpi.sql来生成两个实例的性能对比报告。
当向数据库导入了其他实例的AWR信息之后,也可以使用这个脚本来生成不同实例的对比报告,诸如对生产环境和测试环境的比对,都可以通过类似这样的操作来实现。
以下是awrddrpi.sql调用过程的一个简要列举:
SQL> @?/rdbms/admin/awrddrpi
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter value for report_type:html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
3944144691 1 CCICDB ccicdb ccicdbsrv5
* 572103006 1 ENMO enmo EYGLEE
Database Id and Instance Number for the First Pair of Snapshots
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for dbid: 3944144691
Enter value for inst_num: 1
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
ccicdb CCICDB 46421 19 Oct 2010 00:00 1
46422 19 Oct 2010 00:15 1
46423 19 Oct 2010 00:30 1
46424 19 Oct 2010 00:45 1
46425 19 Oct 2010 01:00 1
Specify the First Pair of Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 46421
Enter value for end_snap: 46422
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
3944144691 1 CCICDB ccicdb ccicdbsrv5
* 572103006 1 ENMO enmo EYGLEE
Database Id and Instance Number for the Second Pair of Snapshots
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for dbid2: 572103006
Enter value for inst_num2: 1
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for num_days2: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
enmo ENMO 111 02 Nov 2010 14:26 1
112 02 Nov 2010 14:27 1
113 02 Nov 2010 15:00 1
Specify the Second Pair of Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap2: