I need to find the following 4 pieces of information about a target DB (version 11.2.0.4) from the RMAN database RC views:
- Number of DB datafiles
- Number of DB tempfiles
- Oracle Version of the registered DB
- The host that the registered DB resides on
So far I have the following:
Find the number of Datafiles
select max(file#) from rc_backup_set s, rc_backup_datafile d
where d.db_name='${DBNAME}'
and s.set_stamp=d.set_stamp and s.set_count=d.set_count
and s.completion_time > sysdate-1 /
Find the number of Tempfiles
select distinct(file#) from RC_TEMPFILE t where t.db_name='${DBNAME}' /
These give the correct answers in my limited tests but I'm not 100% sure they're correct. Does anybody know how to find these 4 pieces of info from the RC views?
Many thanks.