Issue:
Error:
ORA-20200: Database/Instance 2832289441/1 does not exist in
AWR_PDB_DATABASE_INSTANCE
ORA-06512: at line 27
Solution:
alter system set awr_pdb_autoflush_enabled=true;
conn system/<pwd>@orclcdb >>>> Login into PDB database
exec dbms_workload_repository.create_snapshot();
SQL> @?/rdbms/admin/awrrpt.sql
Console Log:
SQL> show pdbs
----------
------------------------------ ---------- ----------
3 ORCL READ WRITE NO
SQL> alter session set
container=ORCL;
Session altered.
SQL> alter system set
awr_pdb_autoflush_enabled=true;
System altered.
SQL> alter system set
AWR_SNAPSHOT_TIME_OFFSET=1000000 scope=both;
alter system set
AWR_SNAPSHOT_TIME_OFFSET=1000000 scope=both
*
ERROR at line 1:
ORA-65040: operation not
allowed from within a pluggable database
[oracle@localhost admin]$
sqlplus system/oracle@orclcdb >>>> Login into PDB database to fix the above error.
SQL> alter system set
AWR_SNAPSHOT_TIME_OFFSET=1000000 scope=both;
System altered.
SQL> alter session set
container=ORCL
2 ;
Session altered.
SQL> exec
dbms_workload_repository.create_snapshot();
PL/SQL procedure successfully
completed.
SQL> @?/rdbms/admin/awrrpt.sql
Specify the location of AWR
Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AWR_ROOT - Use AWR data from
root (default)
AWR_PDB - Use AWR data from
PDB
Enter value for awr_location:
AWR_PDB
Location of AWR Data
Specified: AWR_PDB
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name
Inst Num Instance Container Name
-------------- --------------
-------------- -------------- --------------
2832289441 ORCLCDB
1 orclcdb ORCL
Root DB Id Container DB Id AWR DB Id
---------------
--------------- ---------------
2780785463 2832289441 2832289441
Instances in this Workload
Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id
Inst Num DB Name Instance Host
------------ ----------
--------- ---------- ------
2832289441
1 ORCLCDB orclcdb 10.0.2.15
Using 2832289441 for database
Id
Using 1 for instance number
Specify the number of days of
snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days
(n) will result in the most recent
(n) days of snapshots being
listed. Pressing <return> without
specifying a number lists all
completed snapshots.
Enter value for num_days: 1
Listing the last day's
Completed Snapshots
Instance DB Name Snap Id Snap
Started Snap Level
------------ ------------
---------- ------------------ ----------
orclcdb ORCLCDB 1 04
Jan 2021 12:04 1
Specify the Begin and End
Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:
Comments