Re: Hot Backup Question

From: Ed Kulis <ekulis_at_hal.com>
Date: 1996/07/09
Message-ID: <31E2C582.7E1_at_hal.com>#1/1


Ernst Renner wrote:
>
> Hello All!
>
> I am performing hot backups on an HP-UX system. After putting a
> tablespace in backup mode, I copy the datafiles over to a near-line
> device. At this time I perform a check sum of the two files to ensure
> the same size and gain a sense of comfort o f the backup status.
> Now, it was my understanding that when a tablespace is in backup that
> transactions are NOT written to the physical file until the tablespace is
> taken out of backup mode. When I do my check summing, on the more
> volatile tablespaces, the check fails because it looks like the file has
> changed since I copied it.
> Does anyone have any idea on what to check, if my theory is incorrect, or
> basically any idea on this topic? This has just started recently, as my
> OLTP users have increased their online durations to 24/7. I had had
> about 5 hrs/night to do this where there were no transactions ongoing or
> outstanding.
>
> Thanks!
>
> -
> ERNST RENNER erenner_at_itthartford.com

Yes, the file has changed. All that happens when you set begin backup mode is that the archive log number in each datafile in the tablespace is frozen. The datafiles are still actively changing just as they always do. When you backup the datafile with frozen log number you get a fuzzy copy of the data. You just don't know what you get. I know that this sounds shocking but it's true.

If a recovery is needed you restore the data file with the frozen archive log number and then Oracle knows where to start to overwrite the data in the file with the transaction information in the archive log files. If you've got all the archive log files then the recover will continue up until that last log switch and the last redo log that's intact.

The problem here is that if one of your restored archive logs in the middle is corrupt the recovery can go no farther. So if you've got 500 arvhive logs and #250 is corrupt that's all Oracle will restore and you are SOL for the latest 250 archive log files.

So, the archive log files are precious. It's best to copy them to another disk often and then out to tape making sure that you always have all of them since the last BEGIN BACKUP copy of the datafiles. Theoretically, you only need to be in BEGIN BACKUP mode while you copy the datafiles for any tablespace to the backup media. You can copy the archive logs at any time because they are themselves copies of the redo logs. The redo logs are the files that are actively tracking datafile changes.

-ed

  • Ed Kulis 408-341-5561 Hal Computer Systems
  • Sr. Oracle DBA ekulis_at_hal.com Campbell, CA 95008
  • I would like it to be known that all opinions that are shown
  • are exclusively my own, on my own, all my own.
Received on Tue Jul 09 1996 - 00:00:00 CEST

Original text of this message