Skip to Main Content
  • Questions
  • Difference between "BACKUP DATABASE" [without controlfile autobackup] and "BACKUP DATABASE" [ controlfile autobackup configured]

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Sandeep.

Asked: April 04, 2016 - 1:18 pm UTC

Last updated: April 07, 2016 - 1:21 am UTC

Version: 11.2.0.4.0

Viewed 1000+ times

You Asked

Hi Tom,

I am totally puzzled,

CASE-1
-------------
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN> run
{
BACKUP DATABASE;
}

CASE-2
-------------
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> run
{
BACKUP DATABASE;
}

To my surprise, both are backing up control file as well as spfile .

1) Is this a redundant thing ? Maintained just to justify, the "complete db backup" statement literally, so that the complete db backup is taking control file backup as well when the control-file auto backup is not configured.

2) To my notice, when control file auto backup is configured, the control file and spfile are backed up in a separate backup piece, and when FRA is there this backup piece gets generated, inside /FRA/autobackup. I dont see any other difference ?

3) Considering the recovery of complete DB [including controfile] how case-1 and case-2 are different from each other, or how different they are supposed to behave?

What did I miss?

Thanks and Regards,
Sandeep

and Connor said...

Whenever you do any kind of backup that includes datafile #1 (ie, the system tablespace), the controlfile will be backed up.

The auto-backup control file is for different scenarios, where you might want to ensure you have a current version of the controlfile. As per the docs:

"Structural changes include adding tablespaces, altering the state of a tablespace or data file (for example, bringing it online), adding a new online redo log, renaming a file, adding a new redo thread, enabling or disabling Flashback Database, and so on"

This would hence simplify a recovery process (say) after you created a new tablespace, then had a problem and had not yet taken a full backup.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Sandeep Mishra, April 05, 2016 - 10:44 am UTC

Hi Connor,

Thank You.

SO can I conclude, I should consider controlfile autobackup when the scenario is as below.

+ I did a structural change,
+ and this change does not involve system tablespace
+ I want to take backup, after the change
+ and I am not backing up system tablespace
+ and I also want to backup the controlfile as well

Because other than the above typical scenario, I will always be taking db level backups [complete + incremental] so the system tablespace will always be included, resulting the controlfile backup taken, by default.

Thanks and Regards,
Sandep
Connor McDonald
April 05, 2016 - 12:05 pm UTC

That pretty much sums it up, but I like auto-backup because, (for example) if I add a datafile, I know my controlfile (which has just been altered) has been backed up.

Sandeep Mishra, April 06, 2016 - 7:24 am UTC

Hi Cononr,

Thank You.

Just one more query, apologies if it is bit different than the subject. Once I was asked, when the db is up and running, a file system backup is taken, i.e. backup of the all the mount points, through some OS utility. If the backup is deployed again will the db will be opening up. To my knowledge, I am sure it will go till mount mode, but not confident that it will go to open mode as well. My doubt is a datafile is copied first and then the archives, in this case the SCN is the header and logs will be different, the log which is copied later will have a higher scn, since the db is already up and running.

Just happen to see an article by TOM, where he is saying about retirement, but I would love to have the same website name maintained "Ask Tom". A Salute to TOM.

Thanks and Regards,
Sandeep


Connor McDonald
April 07, 2016 - 1:21 am UTC

Unless you have issued:

alter database begin backup

before you copied the files, and

alter database end backup

afterwards, then there is not a guarantee that you will be able to use the files that were backed up to get a running database. The 'begin backup' command is essential to let us know to save off a little more metadata in the redo logs to ensure that when the files are restored, we can sort out any inconsistencies like the ones you mention.


Sandeep Mishra, April 08, 2016 - 5:38 am UTC

Thank You.
I totally in agreement.
The confident of the questioning individual (a very senior DBA), forced me to rethink, so I asked.
Another reason of asking is may be it is possible just like another of the claims, many time senior DBAs are stating
"It is possible to increase the size of online redo log file, just like you increase a datafile size", though I have not yet found that command as of now. Still searching.

And, you need not answer, as this is not a question to you, just was curious, because most of the time I heard "There are many things possible, which are not documented or suggested by oracle", so just wandering, what else cracks are out there, been found out by senior DBAs

Regards,
Sandeep

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.