zoukankan      html  css  js  c++  java
  • 【Oracle】AWR报告生成

    生成AWR报告

    1.进入Oracle SQL环境

    [oracle@oradb awrrpt]$ sqlplus "/as sysdba"
    SQL*Plus: Release 11.2.0.4.0 Production on 星期三 1月 13 14:20:40 2021
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    连接到: 
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SYS@oradb>
    

    2.执行awrrpt sql语句

    >@?/rdbms/admin/awrrpt.sql
    Current Instance
    ~~~~~~~~~~~~~~~~
    
       DB Id    DB Name	 Inst Num Instance
    ----------- ------------ -------- ------------
     2697310494 ORADB		1 oradb
    
    
    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 的值: 
    

    report_type代表报告的类型,输出为html。

    3.num_days的描述

    
    
    Instances in this Workload Repository schema
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
       DB Id     Inst Num DB Name	   Instance	Host
    ------------ -------- ------------ ------------ ------------
    * 2697310494	    1 ORADB	   oradb	oradb
    
    Using 2697310494 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.
    
    
    输入 num_days 的值:  4
    

    上述输入的4,代表会生成最近4天的快照:

    Listing the last 4 days of Completed Snapshots
    
    							Snap
    Instance     DB Name	    Snap Id    Snap Started    Level
    ------------ ------------ --------- ------------------ -----
    oradb	     ORADB	      17435 10 1月  2021 00:00	   1
    			      17436 10 1月  2021 01:00	   1
    			      17437 10 1月  2021 02:00	   1
    			      17438 10 1月  2021 03:00	   1
    			      17439 10 1月  2021 04:00	   1
    			      17440 10 1月  2021 05:00	   1
    			      17441 10 1月  2021 06:00	   1
    			      17442 10 1月  2021 07:00	   1
    			      17443 10 1月  2021 08:00	   1
    			      17444 10 1月  2021 09:00	   1
    			      17445 10 1月  2021 10:00	   1
    			      17446 10 1月  2021 11:00	   1
    			      17447 10 1月  2021 12:00	   1
    			      17448 10 1月  2021 13:00	   1
    			      17449 10 1月  2021 14:00	   1
    			      17450 10 1月  2021 15:00	   1
    			      17451 10 1月  2021 16:00	   1
    			      17452 10 1月  2021 17:00	   1
    			      17453 10 1月  2021 18:00	   1
    			      17454 10 1月  2021 19:00	   1
    			      17455 10 1月  2021 20:00	   1
    			      17456 10 1月  2021 21:00	   1
    			      17457 10 1月  2021 22:00	   1
    			      17458 10 1月  2021 23:00	   1
    			      17459 11 1月  2021 00:00	   1
    			      17460 11 1月  2021 01:00	   1
    			      17461 11 1月  2021 02:00	   1
    			      17462 11 1月  2021 03:00	   1
    			      17463 11 1月  2021 04:00	   1
    			      17464 11 1月  2021 05:00	   1
    			      17465 11 1月  2021 06:00	   1
    			      17466 11 1月  2021 07:00	   1
    			      17467 11 1月  2021 08:00	   1
    			      17468 11 1月  2021 09:00	   1
    			      17469 11 1月  2021 10:00	   1
    			      17470 11 1月  2021 11:00	   1
    			      17471 11 1月  2021 12:00	   1
    			      17472 11 1月  2021 13:00	   1
    			      17473 11 1月  2021 14:00	   1
    			      17474 11 1月  2021 15:00	   1
    			      17475 11 1月  2021 16:00	   1
    			      17476 11 1月  2021 17:00	   1
    			      17477 11 1月  2021 18:00	   1
    			      17478 11 1月  2021 19:00	   1
    			      17479 11 1月  2021 20:00	   1
    			      17480 11 1月  2021 21:00	   1
    			      17481 11 1月  2021 22:00	   1
    			      17482 11 1月  2021 23:00	   1
    			      17483 12 1月  2021 00:00	   1
    			      17484 12 1月  2021 01:00	   1
    			      17485 12 1月  2021 02:00	   1
    			      17486 12 1月  2021 03:00	   1
    			      17487 12 1月  2021 04:00	   1
    			      17488 12 1月  2021 05:00	   1
    			      17489 12 1月  2021 06:00	   1
    			      17490 12 1月  2021 07:00	   1
    
    							Snap
    Instance     DB Name	    Snap Id    Snap Started    Level
    ------------ ------------ --------- ------------------ -----
    oradb	     ORADB	      17491 12 1月  2021 08:00	   1
    			      17492 12 1月  2021 09:00	   1
    			      17493 12 1月  2021 10:00	   1
    			      17494 12 1月  2021 11:00	   1
    			      17495 12 1月  2021 12:00	   1
    			      17496 12 1月  2021 13:00	   1
    			      17497 12 1月  2021 14:00	   1
    			      17498 12 1月  2021 15:00	   1
    			      17499 12 1月  2021 16:00	   1
    			      17500 12 1月  2021 17:00	   1
    			      17501 12 1月  2021 18:00	   1
    			      17502 12 1月  2021 19:00	   1
    			      17503 12 1月  2021 20:00	   1
    			      17504 12 1月  2021 21:00	   1
    			      17505 12 1月  2021 22:00	   1
    			      17506 12 1月  2021 23:00	   1
    			      17507 13 1月  2021 00:00	   1
    			      17508 13 1月  2021 01:00	   1
    			      17509 13 1月  2021 02:00	   1
    			      17510 13 1月  2021 03:00	   1
    			      17511 13 1月  2021 04:00	   1
    			      17512 13 1月  2021 05:00	   1
    			      17513 13 1月  2021 06:00	   1
    			      17514 13 1月  2021 07:00	   1
    			      17515 13 1月  2021 08:00	   1
    			      17516 13 1月  2021 09:00	   1
    			      17517 13 1月  2021 10:00	   1
    			      17518 13 1月  2021 11:00	   1
    			      17519 13 1月  2021 12:00	   1
    			      17520 13 1月  2021 13:00	   1
    			      17521 13 1月  2021 14:00	   1
    

    4.指定区间的快照id。

    Specify the Begin and End Snapshot Ids
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    输入 begin_snap 的值:  17435
    Begin Snapshot Id specified: 17435
    
    输入 end_snap 的值:  17521
    End   Snapshot Id specified: 17521
    

    5.指定输出的报告的名字

    Specify the Report Name
    ~~~~~~~~~~~~~~~~~~~~~~~
    The default report file name is awrrpt_1_17435_17521.html.  To use this name,
    press <return> to continue, otherwise enter an alternative.
    
    输入 report_name 的值:  
    

    这里可以输出你要的名称。至此,AWR报告生成。

  • 相关阅读:
    推荐一波好的代码托管
    二十一、如何导入svg图片
    二十、滑动开关css
    十九、CSS如何引入字体
    十八、移动端rem布局
    十五、css3 Filter--滤镜
    十四、css动画基础知识
    十三、初始化标签默认样式
    十二、移动端头部声明
    十一、使用a标签打电话、发短信、发邮件
  • 原文地址:https://www.cnblogs.com/zhangshengdong/p/14275475.html
Copyright © 2011-2022 走看看