进入到$ORACLE_HOME/rdbms/admin目录下。
然后sqlplus "/as sysdba"登陆到数据库
执行@awrrpt.sql;
[oracle@appdb2 admin]$ cd $ORACLE_HOME/rdbms/admin
[oracle@appdb2 admin]$ sqllus / as sysdba
-bash: sqllus: command not found
[oracle@appdb2 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 21 17:21:09
Copyright (c) 1982, , Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @awrrpt.sql;
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3565904331 DEMO 1 demo
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'
Enter value for report_type:
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'
Enter value for report_type: 1
Type Specified: 1
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 3565904331 1 DEMO demo appdb2.fleet
Using 3565904331 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.
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
demo DEMO 8612 21 Jul 00:00 1
8613 21 Jul 01:00 1
8614 21 Jul 02:00 1
8615 21 Jul 03:00 1
8616 21 Jul 04:00 1
8617 21 Jul 05:00 1
8618 21 Jul 06:00 1
8619 21 Jul 07:00 1
8620 21 Jul 08:00 1
8621 21 Jul 09:00 1
8622 21 Jul 10:00 1
8623 21 Jul 11:00 1
8624 21 Jul 12:00 1
8625 21 Jul 13:00 1
8626 21 Jul 14:00 1
8627 21 Jul 15:00 1
8628 21 Jul 16:00 1
8629 21 Jul 17:00 1
Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap:
如果觉得《oracle查看语句执行历史 AWT查看oracle历史sql语句执行》对你有帮助,请点赞、收藏,并留下你的观点哦!