为一条SQL语句生成AWR报告!

来源:互联网 发布:商品标签的数据库设计 编辑:程序博客网 时间:2024/04/29 11:43
[oracle@linux ~]$ sqlplus / as sysdba @?/rdbms/admin/awrsqrpt.sqlSQL*Plus: Release 11.2.0.1.0 Production on 星期一 11月 4 17:29:10 2013Copyright (c) 1982, 2009, Oracle.  All rights reserved.连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsCurrent Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------ 1301772781 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 的值:  htmlType Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------* 1301772781        1 ORCL         orcl         linuxUsing 1301772781 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.输入 num_days 的值:  1Listing the last day's Completed Snapshots                                                        SnapInstance     DB Name        Snap Id    Snap Started    Level------------ ------------ --------- ------------------ -----orcl         ORCL               686 04 11月 2013 15:37     1                                687 04 11月 2013 16:01     1                                688 04 11月 2013 16:30     1                                689 04 11月 2013 17:00     1Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~输入 begin_snap 的值:  686Begin Snapshot Id specified: 686输入 end_snap 的值:  689End   Snapshot Id specified: 689Specify the SQL Id~~~~~~~~~~~~~~~~~~输入 sql_id 的值:  7nr1kb47kw04jSQL ID specified:  7nr1kb47kw04jdeclare*第 1 行出现错误:ORA-20025: SQL ID 7nr1kb47kw04j does not exist for this database/instanceORA-06512: 在 line 22从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options 断开