AWT查看oracle历史sql语句执行

进入到$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 2014

Copyright (c) 1982, 2009, 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
                                                y.com

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 <return> 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 2014 00:00      1
                               8613 21 Jul 2014 01:00      1
                               8614 21 Jul 2014 02:00      1
                               8615 21 Jul 2014 03:00      1
                               8616 21 Jul 2014 04:00      1
                               8617 21 Jul 2014 05:00      1
                               8618 21 Jul 2014 06:00      1
                               8619 21 Jul 2014 07:00      1
                               8620 21 Jul 2014 08:00      1
                               8621 21 Jul 2014 09:00      1
                               8622 21 Jul 2014 10:00      1
                               8623 21 Jul 2014 11:00      1
                               8624 21 Jul 2014 12:00      1
                               8625 21 Jul 2014 13:00      1
                               8626 21 Jul 2014 14:00      1
                               8627 21 Jul 2014 15:00      1
                               8628 21 Jul 2014 16:00      1
                               8629 21 Jul 2014 17:00      1

 

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:

转载于:https://my.oschina.net/u/1458864/blog/293550

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值