1、收集ash報告
[oracle@1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Sep 21 18:43:01 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> @?/rdbms/admin/ashrpt.sql
...
Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Press Enter to analyze till current time
Enter value for duration: 回車默認html格式
...
Defaults to -15 mins
Enter value for begin_time: 開始時間,回車默認十五分鍾前 ,自定義格式:09/17/18 00:00:00
...
Press Enter to analyze till current time
Enter value for duration: 結束時間,回車默認但前時間,自定義格式:200 單位:分鍾
...
The default report file name is ashrpt_1_0921_1853.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: 存放路徑,回車默認為:/home/oracle/ashrpt_1_0921_1853.html
輸出樣式:
2、收集awr報告
[oracle@1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Sep 21 18:43:01 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
SQL> @?/rdbms/admin/awrrpt.sql
...
AWR reports can be generated in the following formats. Please enter the
name of the format at the prompt. Default value is 'html'.
'html' HTML format (default)
'text' Text format
'active-html' Includes Performance Hub active report
Enter value for report_type: 類型,回車默認html格式
...
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: 收集的時間段,單位:天
...
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 開始的snap ID
..
Enter value for end_snap: 結束的snap ID
...
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_269_271.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name: 存放路徑,回車默認為:/home/oracle/awrrpt_1_269_271.html
輸出樣式: