-- ======================================
-- Oracle Hot Backup
-- ======================================
Oracle Hot Backup refers to a series of backup operations on database data files, control files, parameter files, and password files when the database is open.
Hot Backup is a backup recovery method based on user management. It is also a common backup method besides RMAN backup.
I. Hot Backup Process
Freeze the block header --> control the SCN to remain unchanged during Backup
Physical copy
Unfreeze block header --> change the SCN (after the SCN is restored, the system automatically updates the SCN to the latest status)
2. Database-based hot standby
Alter database begin backup;
Copy all datafiles to the backup directory.
Alter database end backup;
Iii. Hot Backup Based on tablespace
Alter tablespace tablespace_name begin backup;
Copy the data file of the tablespace_name tablespace to the backup directory.
Alter tablespace tablespace_name end backup;
Task completed during alter tablespace tablespace_name begin backup
When a checkpoint event occurs, the checkpoint notifies DBWn to write all the dirty data in the tablespace to the disk.
The SCN number when the current checkpoint event is frozen in the Data File Header
All the complete images (before and after modification) of changed data blocks are written to the redo log.
Allow normal read/write of data in the tablespace
We recommend that you use table space-based hot standby to minimize the impact on system performance.
Iv. Hot Backup of Control Files
Alter database backup controlfile to '<dir>' [reuse]; -- full backup of the Control File
Alter database backup controlfile to trace as '<dir>' -- a statement used to create a control file. Some information is lost.
Control File changes
Alter database [add | drop] logfile
Alter database [add | drop] logfile member
Alter database [add | drop] logfile group
Alter database [archivelog | noarchivelog]
Alter database rename file
Create tablespace
Alter tablespace [add | rename] datafile
Alter tablespace [read write | read only]
Drop tablespace