【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語句

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報告生成。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章