Home » RDBMS Server » Backup & Recovery » while taking backup
while taking backup [message #145573] Thu, 03 November 2005 20:18 Go to next message
chandan_001
Messages: 3
Registered: November 2005
Location: vizag
Junior Member
Hi

To take hot backup we run the script, so all datafiles will goto readonly mode until backup finishes or only one datafile goto readonly mode, after its physical datafile backup finishes then again another datafile will goto readonly mode,, how exactly.

in detail of my doubt:
alter tablespace ts1 begin backup;

then my ts1 tablespace will not allow to write into this datafile, until i give alter tablespace ts1 end backup; it will not allow anything to write. If in the script of hotbackup, all tablespaces backups statements written then all datafiles at a time will not allow to write any thing till end backup fires or one after the other will goto readonly mode;

if my backup takes let us assume 30 mins. so till 30mins all datafiles will not allow to write datainto datafiles??

-chandan


Re: while taking backup [message #145608 is a reply to message #145573] Fri, 04 November 2005 03:08 Go to previous messageGo to next message
girish.rohini
Messages: 744
Registered: April 2005
Location: Delhi (India)
Senior Member
Chandan

First thing.... start reading docs about backups esp. hot backup in your case.

Quote:

To take hot backup we run the script, so all datafiles will goto readonly mode until backup finishes or only one datafile goto readonly mode, after its physical datafile backup finishes then again another datafile will goto readonly mode,, how exactly.


No the file doesn't get into readonly mode. What exactly happens is that the header of datafile gets freezed & doesn't get updated until you give end backup command.

When you give Alter tablespace... begin backup command... header of all its datafiles gets freezed. Other read write operations continue on file on normal basis.

Quote:


if my backup takes let us assume 30 mins. so till 30mins all datafiles will not allow to write datainto datafiles??


NO.

--Girish
Re: while taking backup [message #145735 is a reply to message #145573] Sat, 05 November 2005 10:31 Go to previous message
Steve Callan
Messages: 44
Registered: January 2004
Member
So the root question is this: where does changed data go during a hot backup?

Oracle stops recording checkpoints to the datafiles in the tablespace when a tablespace is in backup mode. Because a block can be partially updated at the very moment that the operating system backup utility is copying it, Oracle copies whole changed data blocks into the redo stream while in backup mode. After you take the tablespace out of backup mode with the ALTER TABLESPACE ... END BACKUP or ALTER DATABASE END BACKUP statement, Oracle advances the datafile header to the current database checkpoint.

When you restore a datafile backed up in this way, the datafile header has a record of the most recent datafile checkpoint that occurred before the online tablespace backup, not any that occurred during it. As a result, Oracle asks for the appropriate set of redo log files to apply should recovery be needed. The redo logs contain all changes required to recover the datafiles and make them consistent.
Previous Topic: Hot backup
Next Topic: Interview question on recovery
Goto Forum:
  


Current Time: Thu Dec 01 15:31:11 CST 2022