Home » RDBMS Server » Backup & Recovery » begin backup mode
begin backup mode [message #241791] Wed, 30 May 2007 11:28 Go to next message
bksrisai
Messages: 30
Registered: May 2007
Location: hyderabad
Member

hi, when i am taking hot backup, i am issuing alter tablespace .. begin backup and i am copying datafiles mean while i am doing transactions and atlast i am keeping the tablespaces in end backup mode, my question is what's happening when i keep the tablespace in begin backup mode

thanks in advance..
Re: begin backup mode [message #241801 is a reply to message #241791] Wed, 30 May 2007 11:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Typically (non-hotbackup mode) only "changed data" is written to the REDO logfiles when DML occurs.
When a tablespace is in hotbackup mode, any DML results in the whole datablock which contains the changed data is written to the REDO logfile.
This is done to maintain data integrity because Oracle can not be sure which OS blocks have been copied to the target.
So the net result is that while a hot backup is underway, the REDO logfile(s) grow at a much, much faster rate than normal.
Re: begin backup mode [message #241807 is a reply to message #241791] Wed, 30 May 2007 11:49 Go to previous messageGo to next message
hardeys
Messages: 4
Registered: May 2007
Location: India
Junior Member
Hi,

As soon as you put the tablespace in Backup Mode, nothing is written to tablespace datafiles as long as it is Backup mode. All the transactions that need to be posted these files are recorded in redo log files. When the tablespace is in normal mode, the changes from redo log are written back to datafiles. This is reason why System generate more redo when a tablespace is in Backup mode and it is because of this reason we don't put all the tablespace in backup mode at the same time.

Hope it helps you.
Re: begin backup mode [message #241808 is a reply to message #241791] Wed, 30 May 2007 11:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have a look at Backup and Recovery Concepts, Chapter 2 "Backup Principles", section Backups of Online Tablespaces and Datafiles

Especially:
Quote:
You must first place the online tablespace in backup mode with the ALTER TABLESPACE BEGIN BACKUP statement. As a result, Oracle stops recording checkpoints to the tablespace's datafiles.

Quote:
After an online backup is completed, Oracle advances the file header to the current database checkpoint, but only after you run the ALTER TABLESPACE ... END BACKUP or ALTER DATABASE END BACKUP statement to take the tablespace out of backup mode.

Quote:
When you restore a datafile from an operating system backup, 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.

During backup mode, Oracle generates more redo logs as each first modification in a block leads to the copy of the whole block in redo file. So the longest is the backup the more blocks of the tablespace may be copied into redo logs.

Regards
Michel
Re: begin backup mode [message #241810 is a reply to message #241807] Wed, 30 May 2007 11:50 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Hardeep,

Only datafile headers are freezed, data blocks are written as in normal mode but the whole block is copied in the redo file at the first update. This is the reason of the increase in redo generation.

Regards
Michel
Re: begin backup mode [message #241811 is a reply to message #241808] Wed, 30 May 2007 11:52 Go to previous messageGo to next message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Quote:
As soon as you put the tablespace in Backup Mode, nothing is written to tablespace datafiles..


This is nonsense! See http://www.orafaq.com/faq/does_oracle_write_to_data_files_in_begin_hot_backup_mode
Re: begin backup mode [message #241812 is a reply to message #241801] Wed, 30 May 2007 11:52 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Ana,

The block is entirely written only at the first update not for each DML (fortunatly).

Regards
Michel
Re: begin backup mode [message #242110 is a reply to message #241791] Thu, 31 May 2007 12:16 Go to previous messageGo to next message
bksrisai
Messages: 30
Registered: May 2007
Location: hyderabad
Member

thanks each and every one, one more doubt,when i kept the tablespace in begin backup mode and i am doing transactions suddenly power has shut down, when i opened the database what about the transactions that i had done with out keeping the tablespace in end backup mode?

thanks in advance
Re: begin backup mode [message #242114 is a reply to message #242110] Thu, 31 May 2007 12:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68651
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no difference for transactions if tablespace is or not in backup mode.

Regards
Michel
Re: begin backup mode [message #242484 is a reply to message #242114] Sat, 02 June 2007 12:04 Go to previous message
harshad.gohil
Messages: 157
Registered: April 2007
Location: USA
Senior Member
If your transaction has been commited then it should exist in your db, else you have lost that transaction.
Previous Topic: User-managed backups of a 10g DB using ASM
Next Topic: database oracle 8.0.5
Goto Forum:
  


Current Time: Wed May 15 01:55:13 CDT 2024