0

The Oracle 12c 2 Day DBA manual states:

While whole database backups can be an important element in your overall backup strategy, they are also a required step in some situations, such as when you enable or disable ARCHIVELOG mode.

(I'm assuming that a "whole" database backup is the same as a "full" database backup as mentioned in the Concepts section.)

In the section "Enabling Archiving of Redo Log Files" the manual states:

You cannot use backups from before the switch to ARCHIVELOG mode to restore and recover the database to a point in time after the switch. Thus, if you do not immediately make a backup after switching, then you are running your database without a valid backup.

Is the first excerpt of the manual wrong? Is the requirement that you need -any- type of backup? Or does it really need to be a full backup, as opposed to a level 0 backup? If so, why the difference?

3

You cannot use backups from before the switch to ARCHIVELOG mode to restore and recover the database to a point in time after the switch.

Looking at this quote it makes sense. If you enable archivelog on a database where it was not enabled, then any backup that you have before archive log was enabled can't be used to do a point in time recover, since you have no archive logs to rolll forward from the backup. You just have the backups and can restore to whatever warm backups that you have.

If you take a database that has archive log enabled and disable archive log, then going forward you can't do point in time recover. You can only restore to whatever backups that you have. But any warm backup that you have from when the database was in archive log can be restored and rolled as far forward as you have archive logs.

As far as I know both a warm full backup and incremental level 0 backup are full backups and you should be able to use either to do a full point in time restore provided that the databases were in archive log mode during the backup. Probably the biggest difference between a full backup and an incremental level 0 backup is that the incremental level 0 backup will update the block change tracking file, but I'm not sure that a full hot backup will do that.

But if you want to know for certain take a database that is not in archive log mode, put it in archive log mode, do an incremental level 0 backup, drop the database and restore it. You will know for certain then.

|improve this answer|||||
  • Your explanation confirms my suspicion. Just wanted to be sure my confusion was indeed caused by a mistake in the documentation. I'll do some testing later on and try to confirm... – Wouter Apr 29 '16 at 14:34
  • 2
    @wouter The documentation isn't wrong. A level 0 backup is a whole database backup + the starting point to be able to do level 1 (incremental) backups, so a level 0 backup satisfies the requirement of needing to take a whole database backup after switching archivelog modes. – Kris Johnston Apr 29 '16 at 17:23
  • Ah, good to know. I found it confusing as "whole database backup" is mentioned nowhere in the section on incremental backups. Don't want to be -too- autistic on this, but it is -not- mentioned explicitly in the documentation that a level 0 backup is a whole database backup. So at the very least, the documentation is incomplete. – Wouter May 2 '16 at 7:42
3

It's not really a requirement. The database itself will work perfectly without backup after switching between ARCHIVE / NOARCHIVE mode. But if something ever goes wrong (or database needs to be copied/cloned to other machine), you'll need a backup.

You may or may not use incremental backups feature ; if you do want to use them you must take 0-level backup which will be parent for subsequent incremental backups:

The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy. Thus, an incremental level 0 backup is a full backup that happens to be the parent of incremental backups whose level is greater than 0. ( https://docs.oracle.com/database/121/BRADV/rcmcncpt.htm#BRADV89499 )

|improve this answer|||||
  • So, a level 0 backup is also called a "whole database backup"? Or the first excerpt is wrong in saying that a whole database backup is required, and should have mentioned that a level 0 backup would also be ok? – Wouter Apr 29 '16 at 14:29
  • 1
    Level 0 backup = (full backup (whole db backup) + ability to use as a parent to incremental backups) – a1ex07 Apr 29 '16 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.