RMAN catalog maintenance

  • From: Sandra Becker <sbecker6925@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 26 Jun 2014 16:11:50 -0600

After our DBA team was cut in half during recent layoffs, I was tasked with
simplifying our current backup strategy.  We have a mixture of 10gr2
through 11gR2.  Every database had its own catalog in production but lower
environments had catalogs based on the database version.  When I questioned
this strategy last fall (shortly after I started), I was told this was
necessary because a single catalog was too slow.  Never got any details on
what exactly was slow though. The multiple catalogs led to yet another
schema, tables, scripts to collect all the backup information in one place
for the daily report.

So I was tasked with consolidating this multitude of catalogs into
two--production and lower environments.  Consolidation has gone well so
far.  Backups are not taking any longer, I created an Apex report to pull
the data from both catalogs into a single report (rather than the three we
previously had.)

We have a catalog maintenance script that runs for each database.  It
crosshchecks and deletes expired backups.  The databases don't run the
script at the same time so there's less contention on the catalog.

Now my question:
I would like to ensure this script is as efficient as possible.  I see the
following and was wondering if this is really an efficient script:

crosscheck backup completed between 'sysdate - 90' and 'sysdate - 35';
delete force noprompt expired backup completed between 'sysdate - 90' and
'sysdate - 35';
crosscheck backup completed between 'sysdate - 180' and 'sysdate - 91';
delete force noprompt expired backup completed between 'sysdate - 180' and
'sysdate - 91';
crosscheck backup completed between 'sysdate - 270' and 'sysdate - 181';
delete force noprompt expired backup completed between 'sysdate - 270' and
'sysdate - 181';
crosscheck backup completed between 'sysdate - 365' and 'sysdate - 271';
delete force noprompt expired backup completed between 'sysdate - 365' and
'sysdate - 271';

I'm double-checking, but to the best of my knowledge, we don't have any
backups older than 90 days.  Still, it seems inefficient to me to
repeatedly do the crosschecks and deletes.  What am I not understanding
here?

Thanks for help/suggestions.


-- 
Sandy
Transzap, Inc.

Other related posts: