Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hot backup question 3

Status
Not open for further replies.

louisas

MIS
Sep 9, 2003
6
0
0
GB
I have been told that On-line backups in Oracle require the entire data block containing changed (inserted, updated, deleted) data be copied into the redo log, greatly increasing the cost to support this feature while also increasing risk of the backup failing due to inadequate sizing.

Can someone help me with understanding the above please

Louisa

 
Loiusa,

In answer to your question,

On-line or hot backups can be done on the entire Oracle database or a single tablespace in Oracle.

You can only do a hot backup when the database is in "archivelog" mode. That is you are backing up your redolog or transaction logs. when a tablespace is put into backup mode in Oracle, the following three things happen:

1. Oracle checkpoints the backed up tablespace (which is built on one or more physical files), flushing all changes from shared memory to disk.

2. The SCN (system change number, or unique ID for every transaction) markers for each datafile in that tablespace are "frozen" at their current values. Even though further updates will be sent to the datafiles, the SCN markers will not be updated until the tablespace is taken out of backup mode.

3. Oracle switches to logging full images of changed database blocks to the redologs. Instead of recording how it changed a particular block (the change vector), it will log the entire image of the block after the change (to insure against the "splits" or "fractured blocks" and because Oracle has no idea which O/S command or third party tool you will be using for backing up your datafiles, the exception being RMAN, see below). This is why the redologs grow at a much faster rate while hot backups are going on.

However, "it is incorrect" that your backup will fail because of your inadequate sizing of the redologs. You can create multiple redolog groups in Oracle and they are normally multiplexed or O/S mirrored. At any time only one redolog member is used for the database. If there is high activity in the database during the "hot backup" of a tablespace, then the redolog file will get filled quickly and Oracle will have to do additional switching and moving from one redolog file to another. Anytime that a switch happens, a checkpoint is made and the contents of the redolog file is flushed to disk. This can slow down the performance, "but it will not cause the hot backup to fail or risk a failure". It will have a performance overhead which may cause your users to feel a temporary freeze in their database activities when the tablespace is backed up.

The whole process will be simplied if you use Oracle's RMAN (Recovery Manager) utility. When performing a backup using RMAN, an Oracle server process reads the datafiles, not an operating system utility. The Oracle server process reads whole Oracle blocks, and checks to see whether the block is fractured by comparing control information stored in the header and footer of each block. If a fractured block is detected, the Oracle server process rereads the block. This is why, when using Recovery Manager to back up or copy database files, tablespaces do not need to be in hot backup mode so you do not need to worry too much about the growth of redolog files or performance impact!


Hope this helps
 
Hey Sy,

That was an awesome explanation! 1 Star Chief!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top