select
asn.begin_interval_time,
asn.end_interval_time,
asn.bl_moved,
asn.con_id,
asn.dbid,
asn.error_count,
asn.flush_elapsed,
asn.instance_number,
asn.snap_flag,
asn.snap_id,
asn.snap_level,
asn.snap_timezone,
asn.startup_time,
asn.status
from
sys.dba_hist_ash_snapshot asn
order by
asn.begin_interval_time desc;
select
case when vdb.dbid = asn.dbid then '*' end e,
asn.dbid,
count(*) cnt,
min(asn.begin_interval_time) min_t,
max(asn. end_interval_time) max_t
from
v$database vdb cross join
dba_hist_ash_snapshot asn
group by
asn.dbid,
vdb.dbid
;