您好,登錄后才能下訂單哦!
有時候數據庫中為安裝EM,無法圖形化生成AWR報告,此時需要手工生成AWR報告,ORACLE提供了以個sql,可以手工生成AWR報告,首先創建生成報告的目錄,這里為/home/oracle/AWR
$ mkdir AWR $ cd AWR $ pwd /home/oracle/AWR
進入sqlplus
[oracle@ocp ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 30 02:41:04 2015 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
執行腳本,?代表$ORACLE_HOME,@表示執行sql,默認提供兩種報表格式,html和txt,默認為html格式
@?/rdbms/admin/awrrpt.sql Current Instance ~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance ----------- ------------ -------- ------------ 1425858850 ORCL 1 orcl 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: html
選擇從系統中抽取的報告的時間段,一般設7天就可以了,ORACLE會把七天內的報告都顯示在屏幕上
Enter value for num_days: 7 Listing the last 7 days of Completed Snapshots
輸入開始的snap id和結束的snap id,表示截取報告的時間段
Instance DB Name Snap Id Snap Started Level ------------ ------------ --------- ------------------ ----- orcl ORCL 81 29 Dec 2015 13:33 1 82 29 Dec 2015 15:00 1 83 29 Dec 2015 16:00 1 84 29 Dec 2015 17:00 1 85 29 Dec 2015 18:00 1 86 29 Dec 2015 19:00 1 87 29 Dec 2015 20:00 1 88 29 Dec 2015 21:00 1 89 29 Dec 2015 22:00 1 90 29 Dec 2015 23:00 1 91 30 Dec 2015 00:00 1 92 30 Dec 2015 01:00 1 93 30 Dec 2015 02:00 1 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap: 83 Begin Snapshot Id specified: 83 Enter value for end_snap: 93 End Snapshot Id specified: 93
指定報告名稱,如果不指定,直接回車,系統會按照屏幕提示名稱生成報告名
Report written to awrrpt_1_83_93.html
下載到本地后查看就可以了
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。