mysql awr報告詳解 AWR報告的使用

2021-10-18 11:42:30 字數 2553 閱讀 5716

[oracle@localhost admin]$ pwd /home/oracle/oracle/product/10.2.0/db_1/rdbms/admin [oracle@localhost admin]$ sqlplus sys/

[oracle@localhost admin]$ pwd

/home/oracle/oracle/product/10.2.0/db_1/rdbms/admin

[oracle@localhost admin]$ sqlplus sys/lubinsu as sysdba

sql*plus: release 10.2.0.1.0 - production on sun may 19 15:12:52 2013

connected to:

oracle database 10g enterprise edition release 10.2.0.1.0 - production

with the partitioning, olap and data mining options

sql> @/home/oracle/oracle/product/10.2.0/db_1/rdbms/admin/awrrpt.sql

current instance

db id db name inst num instance

1326384392 orcl 1 orclsid

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(也是預設值)

type specified: html

instances in this workload repository schema

db id inst num db name instance host

* 1326384392 1 orcl orclsid localhost.lo

caldomain

using 1326384392 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 without

specifying a number lists all completed snapshots.

enter value for num_days: 2

listing the last 2 days of completed snapshots

snap

instance db name snap id snap started level

orclsid orcl 220 19 may 2013 10:18 1

221 19 may 2013 11:00 1

222 19 may 2013 11:42 1

223 19 may 2013 12:00 1

224 19 may 2013 12:30 1

225 19 may 2013 13:00 1

226 19 may 2013 13:30 1

227 19 may 2013 14:00 1

228 19 may 2013 14:30 1

229 19 may 2013 15:00 1

specify the begin and end snapshot ids

enter value for begin_snap: 228

begin snapshot id specified: 228

enter value for end_snap: 229

end snapshot id specified: 229

specify the report name

the default report file name is awrrpt_1_228_229.html. to use this name,

press to continue, otherwise enter an alternative.

可以設定檔名,報告分析之後:我們可以在瀏覽器中檢視報告(這裡列出了資料庫的整體運**況,執行時間長的前幾條sql,,引數檔案,等等,注意awr只是乙個報告,並不會幫助我們分析該如何優化,在後面的addm報告則會為我們提供優化的建議):

生成awr報告

oracle內部以一定的頻率把系統關鍵的統計資訊和負載情況儲存起來,生成snapshot 快照 全部的snapshot儲存在awr中。即automatic workload repository。當發現資料庫出現效能問題時。就能夠抽取儲存在awr中的snapshot資訊,生成在指定時間段內 即你指定...

AWR報告解讀

1 cpu不足 詳見os效能分析cpu部分 2 存在執行時間較長的sql語句 存在sql語句執行時間較長,占用了較多的cpu 其中exection 為0 說明在本報告結束快照執行時,尚未執行完畢.elapsed time 為sql語句執行總時間,如果乙個sql語句被多個會話同時執行,則此時間可能高於...

awr使用 生成awr報告步驟

生成awr報告步驟 首先需要sqlplus登入,然後步驟如下 第一步 測試開始 結束分別生成乙個快照 begin dbms workload repository.create shapshot end 有時候第一步會出現未定義的錯誤,此時需要用exec dbms workload reposito...