How to collect AWR performance reports during the busiest periods of the system

Source: Internet
Author: User
As we all know, AWR plays an important role in troubleshooting and performance optimization, A common idea is that we can combine the two AWR performance reports during busy hours and idle hours to clearly see the changes in database performance. Q: What should I do if you want to collect AWR performance reports during the busiest periods of the database? How can we determine the busiest time of a database? Thinking

As we all know, AWR plays an important role in troubleshooting and performance optimization, A common idea is that we can combine the two AWR performance reports during busy hours and idle hours to clearly see the changes in database performance. Q: What should I do if you want to collect AWR performance reports during the busiest periods of the database? How can we determine the busiest time of a database? Thinking

As we all know, AWR plays an important role in troubleshooting and performance optimization, A common idea is that we can combine the two AWR performance reports during busy hours and idle hours to clearly see the changes in database performance.

Q: What should I do if you want to collect AWR performance reports during the busiest periods of the database? How can we determine the busiest time of a database?

Train of Thought: We can roughly judge whether the database is idle or busy in some TIME periods through the database TIME, and generate an AWR performance report by reading the corresponding SNAP_ID. The following is a demo process, you can make slight adjustments as required.

Collect the two interval SNAP_ID of the busiest time of the Database System
Select * from (SELECT snap_id, (nvl (LEAD (snap_id, 1) OVER (order by snap_id), 0) AS "UP_snapid", value, (nvl (LEAD (value, 1) OVER (order by value), 0) AS "UP_value", (nvl (LEAD (value, 1) OVER (order by value), 0 )) -value as "Result" FROM dba_hist_sysstat where stat_name = 'db time' order by 5 desc) where "Result"> 0 running Result is as follows:

Read AWR information through DBMS package
SELECT output  FROM TABLE(DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_TEXT(4160719624,                                                      1,                                                      2335,                                                      2336));

The running result is as follows:

Combined with the above two simple steps, you can quickly collect AWR performance reports during busy hours of the database. However, this is only an AWR performance report of two adjacent snapids. Each SNAP_ID is 1 hour by default, friends can also use this idea to collect AWR performance reports for the busiest period of M in N days. I will not go into details here.

Bytes -------------------------------------------------------------------------------------------------

This article comes from my technical blog http://blog.csdn.net/robo23

For reprinting, please mark the source text link; otherwise, you will be held legally responsible!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.