My Oracle Support Banner

How to Extract Good Plan Hash Value for SQL Statement from AWR Warehouse and Load to SPM Baseline (Doc ID 2382833.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version and later
Information in this document applies to any platform.


Goal of this document is to extract the good plan hash value for SQL statements from AWR warehouse and then to load the good plans for SPM baselines for plan stability. Effective from the release, Oracle Enterprise Manager (EM) Cloud Control now provides the ability to transfer the performance data stored in the Automatic Workload Repository (AWR) across all Oracle databases into a central performance warehouse called AWR Warehouse.


<Document 1907335.1> : Master Note on AWR Warehouse in Enterprise Manager

Users can store the old out of retention historical data to AWR warehouse so that it can be used whenever required.
However, it is a limitation with SQLT which does not look for plans from AWR warehouse when good plans are available in AWR warehouse.
AWR warehouse apparently setup in separate database which has the repository data for all source databases it is registered.
When SQLT is executed from one of the sources , it cannot look from AWR warehouse which is outside of source environment.
DB links have to be created to connect to AWR warehouse DB to extract the plan details for SQLs that are older than the local AWR info.

This document provides the manual scripts to extract the good plans for the SQL statements which can be loaded to SPM baselines of source database.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.