Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Online Backup
[You should study "Oracle database concepts" for further study]
Each datafile contains a system change number, this number says which transaction number is safely committed in the datafile. When recovery is needed, the recovery for a datafile starts at the transaction number recorded in the file. ALTER TABLESPACE BEGIN BACKUP only tells the RDBMS to NOT write this transaction number in the datafiles for that tablespace. When such datafile is restored, the recovery begins at the transaction number from just before the ALTER statement. ALTER TABLESPACE END BACKUP tells the RDBMS that it is safe again to write the transaction number in the file. All datablocks are written to the datafile as usual between the 2 statements.
Between the BEGIN and END BACKUP not only the new data is recorded in
the logfiles, but also the old data.
This is needed to make it possible to recover until any transaction
between the BEGIN and END BACKUP.
This slows down the database operation, but certainly does not stop it.
So during backup you copy a file that has AT LEAST all the transactions
upto the BEGIN BACKUP statement, and
possibly also contains data UNTIL the END BACKUP statement.
The datafile is therefore inconsistent with itself.
The RECOVER command corrects this.
Please note that for Oracle 8 these statements are no longer needed when RMAN is used.
Erwin
Jill wrote:
>
> I have been troubled by something I read on this newsgroup earlier. I
> thought that when you "alter tablespace begin backup", during that period
> nothing is written to the tablespace, only to the redo logs until "..end
> backup". Now I am reading that the tablespace is written to while doing an
> operating system copy, and that full blocks, not just rows, are written to
> the redo logs. Even our senior DBA in our office had the same misconception
> as I.
>
> How does the operating system take a consistent copy of the tablespace,
> especially if it is very large? How does it sort if out upon recovery? I
> know these are broad questions, but if someone could correct my
> understanding, I'd appreciate it.
--
Erwin Dondorp
<http://www.dondorp.com/>
Received on Sat Oct 30 1999 - 10:29:28 CDT