Monday, August 18, 2008

Database and archive log backup in one RUN command


We went live with Oracle CRS this weekend, completing the 5 month 9i to 10g database upgrade project. I also verified the first RMAN backup job after the upgrade and it completed successfully. A known issue with the backup job in 9i no longer exists after the 10g upgrade, acting as an additional bonus of the upgrade !


We take full database backups always without any incremental backups. Though the below run block contains two backup commands, one for the database backup and the other for the archive log backup, the latter never used to get picked up in 9i. In this older version, Oracle always skipped the second backup command in the below run block without reporting any error messages or warnings.

connect rcvcat 'rmanprod/*****@catdb'
connect target '/'

run {
allocate channel t1 type 'SBT_TAPE';
allocate channel t2 type 'SBT_TAPE';
format 'prod_bk_%s_%p_%t'
(database include current controlfile);
# backup all archive logs
skip inaccessible
format 'prod_al_%s_%p_%t'
(archivelog all
delete input);
release channel t1;
release channel t2;
allocate channel for maintenance type 'SBT_TAPE';
crosscheck backup of database;
delete expired backup;
release channel;


Since we have a different backup job to backup only archive logs, we did not pursue this problem with Oracle Support. I am not sure if this is a known issue in 9i version, but pleasantly surprised to find this problem go away in 10g. The first backup job that we run after the 10g upgrade successfully processed both the database backup command and archive log backup command in the same RUN block. The 9i mystery seems to have gone away in 10g. I am interested to know if some of you observed the same issue with 9i before ?


Unknown said...

This is really good catch regarding the consequence of second backup command wont work in 9i.Thanks for your real help to all oracle dba's.

Rinky said...

Srinivas, I need some help in findig the right steps for cleaning RMAN catalog once the target database is deleted. Thanks.

DBA University Blog said...

Have you verified the Oracle "Backup and Recovery Advanced User’s Guide" in 10g ? Please visit to download the book.

Read chapter 10 ( Managing the Recovery Catalog). That should help you understand the process and steps.


Rinky said...

yes, I have reviewed few related articles. we do not use RMAN for clone purposes. we wipe out the test database and restore from production to refresh it. So do I need to use the option to delete the backups and unregistering the database before we wipe out the database? I am trying to figure out the best way to do it with clear steps for my colleagues. Right now we do not have any steps before we wipe out the old database, so it will be additional overhead if I connect to both target and catalog database to delete/unregister. Is there any other way to directly cleanup from catalog if the target database is already wiped out? As I understand it is not a different incarnation, the ones to be deleted is a complete database by itself.

Rinky said...

any ideas?

DBA University Blog said...


Lot of things going on. So busy at work. I will look into it after a few days. As per my understanding its not a P1 issue for you.

-Srinivas Ramineni

Rinky said...

No problem, we can discuss later. it is not p1 issue.

Related Posts Plugin for WordPress, Blogger...