0

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:

  1. Number of DB datafiles
  2. Number of DB tempfiles
  3. Oracle Version of the registered DB
  4. 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.

Franco
  • 23
  • 1
  • 8
  • I'm grabbing my RC view info here: https://docs.oracle.com/html/E10643_07/rcviews001.htm – Franco Jun 21 '17 at 11:55
  • If anyone can confirm if the 2 posted SQL statements give accurate info that would also be a big help. – Franco Jun 26 '17 at 01:25
  • The 2 commands provided are correct. The other 2 pieces of info need to be found elsewhere. – Franco Nov 02 '17 at 09:56

1 Answers1

0

The 2 SQL commands provided (to determine the number of datafiles and tempfiles) are correct. The other 2 pieces of info need to be found elsewhere - it's not possible to grab those details from the catalog.

Franco
  • 23
  • 1
  • 8