| Lesson 7 | NOARCHIVELOG Recovery — Oracle 23c/23ai |
| Objective | Explain limits and safe procedures for backing up and restoring databases that run in NOARCHIVELOG mode. |
In NOARCHIVELOG mode, filled online redo logs are reused and never archived. This enables simple setups and some performance savings, but it eliminates point-in-time recovery beyond the most recent consistent backup. The only safe strategy is a scheduled series of consistent (cold) backups taken while the database is shut down or mounted.
SVRMGR and CONNECT INTERNAL are obsolete.init.ora. Edit persistent parameters via ALTER SYSTEM or by recreating SPFILE when necessary.In NOARCHIVELOG mode, take backups with the database down or mounted to ensure consistency:
-- As Oracle software owner
$ rman target /
-- Ensure a clean checkpoint and consistent state
RMAN> SHUTDOWN IMMEDIATE;
RMAN> STARTUP MOUNT;
-- Optional: validate space/paths here
-- Take a consistent whole-database backup (datafiles + controlfile + spfile)
RMAN> BACKUP AS BACKUPSET DATABASE INCLUDE CURRENT CONTROLFILE PLUS ARCHIVELOG DELETE INPUT;
-- In NOARCHIVELOG, the "PLUS ARCHIVELOG" will back up any stray archivelogs
-- from prior ARCHIVELOG runs; it's harmless and ensures controlfile capture.
-- Create a control file copy for disaster recovery (optional but recommended)
RMAN> BACKUP CURRENT CONTROLFILE;
-- Done
RMAN> SHUTDOWN;
Store the backup sets and the tuned SPFILE off the server.
For small labs, you may also use image copies (BACKUP AS COPY) for fast restore.
If a datafile is lost and you are in NOARCHIVELOG mode, restore the last consistent backup and open with RESETLOGS:
$ rman target /
-- Ensure instance is down and files are not busy
RMAN> SHUTDOWN IMMEDIATE;
RMAN> STARTUP NOMOUNT;
-- If control file is lost, restore it first
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
-- Mount the database so datafiles are known
RMAN> ALTER DATABASE MOUNT;
-- Restore all files from the last consistent backup
RMAN> RESTORE DATABASE;
-- No archived redo available to roll forward
-- So recover step will be minimal / metadata only
RMAN> RECOVER DATABASE NOREDO;
-- Open with resetlogs to create a new incarnation
RMAN> ALTER DATABASE OPEN RESETLOGS;
Result: Database returns to the exact point of the last backup; all later transactions are lost.
RESTORE ... VALIDATE and periodic test restores.If you need any of these, switch to ARCHIVELOG and design an RMAN strategy with archived redo destinations, monitoring, and retention.
-- Check log mode
SQL> SELECT log_mode FROM v$database;
-- Confirm dictionary components are VALID after restore
SQL> SELECT comp_name, status FROM dba_registry ORDER BY 1;
-- Capture a fresh baseline after OPEN RESETLOGS
BEGIN
DBMS_STATS.GATHER_DICTIONARY_STATS;
END;
/
Next module: Recovering databases in ARCHIVELOG mode (hot backups, PITR, and roll-forward with archived redo).