Wednesday, August 20, 2025

Steps for Comparing 2 AWR reports from different databases

Firstly there is no direct way/option of comparing 2 complete different oracle databases but however there are certain steps need to perform to achieve this.

Lets assume,

DB1 as SOURCE
DB2 as TARGET

High Level Steps

  1. Extract the AWR data from the SOURCE database (@?/rdbms/admin/awrextr.sql )

  2. Transfer the data dumps to TARGET machine/server

  3. Load the AWR data to TARGET DATABASE (@?/rdbms/admin/awrload.sql)

  4. generate an AWR Compare Periods report ( @?/rdbms/admin/awrddrpt.sql )

  5. generate an AWR Compare Periods report for RAC for Local DB (@?/rdbms/admin/awrgdrpt.sql )

  6. generate an AWR Compare Periods report for RAC for specific DB (@?/rdbms/admin/awrgdrpti.sql )


Transport AWR data from one system to another :

first export the AWR data from the database on the source system, and then import it into the database on the target system so that you have both awr info in single DB to compare


Step 1: Prepare Directory

Create a directory or use the existing one with write permissions to it

Step 2: Export AWR Data from Source Database

Run this below script

@$ORACLE_HOME/rdbms/admin/awrextr.sql

You will be prompted for:
(1) database id
(2) snapshot range to extract
(3) name of directory object
(4) name of dump file
(5) export sql monitor data or not

Step 3: Transfer Export Dump File to Target Server

Copy .dmp file to target server/ location

Step 4: Prepare Directory Object in Target Database
Create a directory or use the existing one where you have placed the source dumps

Step 5: Import AWR Data into Target Database
Run the “awrload.sql” script as SYS in the target database to load the data, if you are using PDB then set container to that PDB and run the script below

@$ORACLE_HOME/rdbms/admin/awrload.sql

Step 6: Generate Compare Period Report in Target RAC Database

@$ORACLE_HOME/rdbms/admin/awrgdrpt.sql

  • All Options are all Self explanatory


Refer Oracle Doc:
https://docs.oracle.com/en/database/oracle/oracle-database/18/tgdba/comparing-database-performance-over-time.html

0 comments:

Post a Comment

Auto Scroll Stop Scroll