-- ======================================
-- OracleHot Backup
-- ======================================
OracleHot Backup means that the database is inOpenTo back up database data files, control files, parameter files, and password files.
Hot Backup is a backup recovery method based on user management.RMANBackup is a common backup method.
I. Hot Backup Process
Freeze block Header-->ControlSCNNo change during Backup
Physical copy
Unfreeze block Header-->LetSCNChangeable(WhenSCNAfter the restoration, the system automatically updatesSCNTo the latest status)
2. Database-based hot standby
Alter Database Begin Backup;
Copy allDatafileTo the Backup Directory
Alter Database End Backup;
Iii. Hot Backup Based on tablespace
AlterTablespace tablespace_nameBegin Backup;
CopyTablespace_nameTablespace data files to the backup directory
AlterTablespace tablespace_nameEnd Backup;
AlterTablespace tablespace_nameBegin BackupCompleted tasks
Check Point event, Check Point notificationDBWnWrite all the dirty data in the tablespace to the disk.
When the current checkpoint event is frozen in the data file headerSCNNo.
Complete images of all changed data blocks(Before and after modification)WrittenRedoLogMedium
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 BackupControlfileTo '<Dir>';--Full backup of Control Files
Alter Database BackupControlfileToTraceAs '<Dir>'--The statement used to create the control file. Some information is lost.
Control File changes
Alter Database[Add | drop] logfile
Alter Database[Add | drop] logfile member
Alter Database[Add | drop] logfileGroup
Alter Database[Archivelog | noarchivelog]
Alter DatabaseRenameFile
CreateTablespace
AlterTablespace [add | rename] datafile
AlterTablespace [read write | read only]
DropTablespace