conn / as sysdba
set linesize 150
column pdb_name format a10
column begin_time format a26
column end_time format a26
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
alter session set nls_timestamp_format='dd-mon-yyyy hh24:mi:ss.ff';
-- Last sample per PDB.
select r.con_id,
p.pdb_name,
r.begin_time,
r.end_time,
r.sga_bytes,
r.pga_bytes,
r.buffer_cache_bytes,
r.shared_pool_bytes
from v$rsrcpdbmetric r,
cdb_pdbs p
where r.con_id = p.con_id
order by p.pdb_name;
-- Last hours samples for PDB1
select r.con_id,
p.pdb_name,
r.begin_time,
r.end_time,
r.sga_bytes,
r.pga_bytes,
r.buffer_cache_bytes,
r.shared_pool_bytes
from v$rsrcpdbmetric_history r,
cdb_pdbs p
where r.con_id = p.con_id
and p.pdb_name = 'pdb1'
order by r.begin_time;
-- Check you are licensed to do this before trying!
-- All AWR snapshot information for PDB1.
select r.snap_id,
r.con_id,
p.pdb_name,
r.begin_time,
r.end_time,
r.sga_bytes,
r.pga_bytes,
r.buffer_cache_bytes,
r.shared_pool_bytes
from dba_hist_rsrc_pdb_metric r,
cdb_pdbs p
where r.con_id = p.con_id
and p.pdb_name = 'PDB1'
order by r.begin_time;