Please send your Questions & Answers or Feedback to "dvmadhavreddy@javabook.org"

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Hot Backup


Hot backup is also called as online backup/inconsistant backup.
This is the type of backup strategy that we implement for 24/7 customers.
The prerequisite for hot backup strategy is database must and should run in archive log mode.
In case of hot backup there is no concept of simple restore(we must and should perform recovery).
In order to take hot backup we depend on operating system command "cp".
In case of hot backup, we are going to backup only datafiles and control files but not online redo log files since they are contiguously modified.
In case of hot backup, we backup the datafiles at operating system level using "cp" command and control files at oracle level by executing the following command :
SQL> alter database backup controlfile to '<path/control01.ctl>';
We take hot backup tablespace by tablespace by keeping the tablespace in a special mode called 'begin backup'.
SQL> alter tablespace system begin backup;
Once the backup of datafiles of a specific tablespace is completed, we execute :
SQL> alter tablespace system end backup;
Once we keep the tablespace in begin backup mode, oracle freezes the headers of the datafiles and oracle will not update the SCN that was generated.
Once we execute end backup of the tablespace oracle updates the SCN that was generated.
Hot backup is not a consistant backup since there are chances of having fractured blocks/split blocks. Because of this reason we cannot perform simple restore.
Recommanded to keep the tablespce in begin backup for shorter duration otherwise excessive redo information will be generated which results in more number of archives in the archive destination.
If the archive destination is 100% filled,database goes to hung state.
In case of hot backup for the first time oracle brings and keeps the entire block in the Database Buffer Cache(DBC) which leads to more number of log switches.
At the end of every hot backup recommanded to switch the log file manually by executing the following command :
SQL> alter system switch logfile;
The above causes a checkpoint and the checkpoint information will be updated to the control file and datafile headers.

In oracle 10g, oracle has introduced a single command to keep the entire database in begin backup mode.
SQL> alter database begin backup;
copy *.dbf <backup destination>
SQL> alter database end backup;
Recommanded to use the above command during half peek hours (non business hours) otherwise excessive redo information will be generated.
With respect to cold/hot, the way how we take the backup differs, but once it comes to restore and recovery the process is same.

Related Posts Plugin for WordPress, Blogger...

Flag Counter