Oracle Database AWR Management

Source: Internet
Author: User

Snapshot sql> col begin_interval_time for a30sql> col end_interval_time for  a30sql> select snap_id,     to_char (Begin_interval_time, ' Yyyy-mm-dd hh24:mi:ss ')  begin_interval_time,    to_char (End_interval_time, ' Yyyy-mm-dd hh24:mi:ss ')  end_interval_time    from dba_hist_snapshot  order by 1;       snap_id begin_interval_time             end_interval_time---------- ----------------- ------------- ------------------------------       155 2018-06-25  19:00:22            2018-06-25 20:00:25        156 2018-06-25 20:00:25              2018-06-25 21:00:27       157 2018-06-25 21:00:27             2018-06-25 22:00:33        158 2018-06-25 22:00:33             2018-06-25 23:00:36       159  2018-06-25 23:00:36            2018-06-26  00:00:39       160 2018-06-26 00:00:39             2018-06-26 01:00:41        161 2018-06-26 01:52:17             2018-06-26 02:04:22       162 2018-06-26  02:04:22            2018-06-26 03:00:24       163  2018-06-26 03:00:24            2018-06-26  04:00:27       164 2018-06-26 04:00:27             2018-06-26 05:00:29        165 2018-06-26 05:00:29             2018-06-26 06:00:32       sql> exec dbms_ Workload_repository.create_snapshot ();P l/sql procedure successfully completed. Sql> exec dbms_workload_repository.drop_snapshot_range (low_snap_id=>150,high_snap_id=>154); Pl/sql procedure successfully completed. Sql> col snap_interval for a20sql> col retention for a20sql> select snap_interval,retention,topnsql from dba_hist_wr_control; snap_interval        retention             topnsql-------------------- -------------------- --------------- ---------------+00000 01:00:00.0    +00008 00:00:00.0     Defaultsql> exec dbms_workload_repository.modify_snapshot_settings (Retention=>15*1440,interval =>30);P l/sql procedure successfully completed. sql> select snap_interval,retention,topnsql from dba_hist_wr_control; snap_interval        retention             topnsql-------------------- -------------------- --------------- ---------------+00000 00:30:00.0    +00015 00:00:00.0   &NBsp;default


Baseline Sql> exec dbms_workload_repository.create_baseline (start_snap_id=>155,end_snap_id=>156, Baseline_name=> ' baseline01 ');P l/sql procedure successfully completed. Sql> col baseline_name for a30sql> select baseline_name,baseline_id,start_ snap_id,end_snap_id from dba_hist_baseline; baseline_name                   baseline_id start_snap_id end_snap_id------------------------------ -----------  ------------- -----------baseline01                                 1           155          156SYSTEM_MOVING_WINDOW                     0              1         168sql > exec dbms_workload_repository.drop_baseline (baseline_name=> ' baseline01 ', cascade=>false); Pl/sql procedure successfully completed. sql> select baseline_name,baseline_id,start_snap_id,end_snap_id from dba_hist_baseline; baseline_name                   baseline_id start_snap_id end_snap_id------------------------------ -----------  ------------- -----------system_moving_window                      0              1         168 


Report sql> @?/rdbms/admin/awrrpt.sql-Generate the most common Awr reporting method sql> @?/rdbms/admin/awrddrpt.sql-Compare two awr reports sql> @?/rdbms/ Admin/awrsqrpt.sql--Generate an execution plan for the specified sql_id in the AWR report


Oracle Database AWR Management

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.