Oracle version 12.2 or higher level PDB create AWR report

aims

AWR is how to create a PDB level on version 12.2 or later?

solution

This is a new feature of version 12.2 or later.

You can enable and create AWR report in the PDB level as detailed below.

1) Set the PDB level awr_pdb_autoflush_enabled = true:

alter session set container=PDB1;

alter system set awr_pdb_autoflush_enabled=true;

2) set correctly AWR snapshots

select * from cdb_hist_wr_control;

DBID SNAP_INTERVAL RETENTION TOPNSQL CON_ID
2580889417 +40150 00:01:00.0 +00008 00:00:00.0 DEFAULT 3

execute dbms_workload_repository.modify_snapshot_settings(interval => 60);

select * from cdb_hist_wr_control;

DBID SNAP_INTERVAL RETENTION TOPNSQL CON_ID
2580889417 +00000 01:00:00.0 +00008 00:00:00.0 DEFAULT 3

3) Another set AWR_SNAPSHOT_TIME_OFFSET to 1000000 to avoid performance problems when multiple PDB while creating a snapshot.

alter system set AWR_SNAPSHOT_TIME_OFFSET=1000000 scope=both;

4) Wait 1-2 hours snapshot generated automatically:

select * from awr_pdb_snapshot;

Or, you can manually create a snapshot:

SQL> connect / as sysdba
SQL> alter session set container=PDB1;
SQL> exec dbms_workload_repository.create_snapshot();

Creating AWR report:

@?/rdbms/admin/awrrpt

Specify the location of AWR Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AWR_ROOT - Use AWR data from root (default)
AWR_PDB - Use AWR data from PDB ** Use the location AWR_PDB for a PDB level report

 

Guess you like

Origin www.cnblogs.com/bicewow/p/12468755.html