Loading SQL Statements from AWR Snapshots

You can load SQL statements captured in AWR snapshots. This is useful when you want to collect SQL statements for specific snapshot periods of interest that can be used for later comparison or tuning purposes.

To load SQL statements from AWR snapshots:

  1. Access the Create SQL Tuning Set: Load Methods page, as explained in "Creating a SQL Tuning Set: Options".

  2. Select Load statements one time only.

  3. In the Data Source list, select AWR Snapshots.

  4. In the AWR Snapshots field, select the snapshots to include. Do one of the following:

    • Select either ALL or a time period such as Last 24 hours and then go to Step 6.

      Only snapshots that are captured and stored in AWR in the specified time are included.

    • Select Customize and then go to Step 5.

      Only snapshots that are captured and stored in AWR during a customized time period that you specify are included.

  5. To select a customized time period of snapshots, complete the following steps:

    1. Select Customize and then click Go.

      The Select Time Period window opens.

    2. For the starting snapshot, select Period Start Time and then click the snapshot icon below the Active Session graph that corresponds to the desired start time.

    3. For the ending snapshot, select Period End Time and then click the snapshot icon below the Active Session graph that corresponds to the desired end time.

    4. Click Select.

    In this example, the snapshot taken on December 27, 2011 at 9:00 a.m. is selected as the start time, and the snapshot taken on December 27, 2011 at 11:00 a.m. is selected as the end time.

  6. Click Next.

    The Create SQL Tuning Set: Filter Options page is shown.

  7. Proceed to the next step, as described in "Creating a SQL Tuning Set: Filter Options".