All technological notes.
NOARCHIVELOG ModeNOARCHIVELOG ModeScenario to restore datafile
NOARCHIVELOG mode + any data file is lostSolution:
Steps:
data and control files from a backup.In NoArchiveLog mode, when the database is recovery to a specific time, all CDB and PDBs are bought back to this point of time. 整体恢复, 不存在个别 pdb 能恢复到不同的时间点.
Example:
-- connect
rman target /
-- Restore Control Files
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE;
-- restore and recover database
ALTER DATABASE MOUNT;
RESTORE DATABASE;
RECOVER DATABASE;
-- Start the Instance and Open the Database (CDB and All PDBs):
SQL 'ALTER PLUGGABLE DATABASE ALL OPEN';
NOREDO optionScenario
NOARCHIVELOG mode + any data file is lost + incremental backup strategySolution:
level 0 and level 1 backups to restore and recover the database.level 0 backup and then RMAN recovery applies the incremental backups.Prerequisites:
incremental backups must be consistent backups.NOREDO option:
NOREDO option, RMAN searches for the online redo log files after applying the incremental backups. 不使用NOREDO时, 自动搜索在线档online redo log files are not available, RMAN issues an error message.RECOVER DATABASE command **without the NOREDO option:**
current online redo log files contain all changes since the last incremental backup. 当前 redo 包含自上次递增备份所有改变RECOVER DATABASE command + NOREDO option:
online redo log files are lost or if the redo cannot be applied to the incremental backups. 当前 redo 不适用Example:
-- restore cf
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE;
-- resotre df
ALTER DATABASE MOUNT;
RESTORE DATABASE;
-- recover noredo
RECOVER DATABASE NOREDO;
ALTER DATABASE OPEN RESETLOGS;