Oracle RMAN database backup and recovery in non-archive Mode
1. Database Backup in non-archive Mode
SQL> archive log list;
Database Log mode non-archive Mode
Disable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 3244
Current Log sequence 3246
RMAN> run
2> {
3> allocate channel t1 type disk;
4> backup database format 'e: \ rman_bak \ 20111103 \ df _ % t _ % s _ % p. bak ';
5>}
Use the target database control file to replace the recovery directory
Allocated channel: t1
Channel t1: SID = 14 device type = DISK
Start backup from March 11 to April 11
Channel t1: starting all data file backup Sets
Channel t1: data files in the specified backup set
RMAN-03009: backup command (on t1 channel, on 10:21:43) failed
ORA-19602: failed to back up or copy active files in NOARCHIVELOG Mode
Continue to execute other job steps and will not re-run the failed job
Channel t1: starting all data file backup Sets
Channel t1: data files in the specified backup set
The backup set contains the current control file.
The backup set contains the current SPFILE.
Channel t1: Starting segment 1 from March 11 to April 11
Channel t1: Completed segment 1 from March 11 to April 11
Segment handle = E: \ RMAN_BAK \ 20111103 \ DF_766232503_2_1.BAK mark = TAG20111103T102143 comment = NONE
Channel t1: Backup set completed. elapsed time: 00: 00: 01
Released channel: t1
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03009: backup command (on t1 channel, on 10:21:43) failed
ORA-19602: failed to back up or copy active files in NOARCHIVELOG Mode
RMAN> shutdown immediate
Database closed
Database uninstalled
Oracle instance disabled
RMAN> startup mount
Connected to the target database (not started)
Oracle instance started
Database loaded
The system's global region consists of 535662592 bytes.
Fixed Size 1375792 bytes
Variable Size 411042256 bytes
Database Buffers: 117440512 bytes
Redo Buffers: 5804032 bytes
RMAN> run
2> {
3> allocate channel t1 type disk;
4> backup database format 'e: \ rman_bak \ 20111103 \ df _ % t _ % s _ % p. bak ';
5>}
Allocated channel: t1
Channel t1: SID = 133 device type = DISK
Start backup from March 11 to April 11
Channel t1: starting all data file backup Sets
Channel t1: data files in the specified backup set
Input data file: File No. = 00004 name = D: \ ORACLE \ ORADATA \ ORCL \ USERS01.DBF
Input data file: File No. = 00001 name = D: \ ORACLE \ ORADATA \ ORCL \ SYSTEM01.DBF
Input data file: File No. = 00005 name = D: \ ORACLE \ ORADATA \ ORCL \ TEST01.DBF
Input data file: file number = 00006 name = D: \ ORACLE \ ORADATA \ ORCL \ UNDOTBS02.DBF
Input data file: file number = 00002 name = D: \ ORACLE \ ORADATA \ ORCL \ SYSAUX01.DBF
Channel t1: Starting segment 1 from March 11 to April 11
Channel t1: Completed segment 1 from March 11 to April 11
Segment handle = E: \ RMAN_BAK \ 20111103 \ DF_766232799_3_1.BAK mark = TAG20111103T102639 comment = NONE
Channel t1: Backup set completed. elapsed time: 00: 01: 55
Channel t1: starting all data file backup Sets
Channel t1: data files in the specified backup set
The backup set contains the current control file.
The backup set contains the current SPFILE.
Channel t1: Starting segment 1 from March 11 to April 11
Channel t1: Completed segment 1 from March 11 to April 11
Segment handle = E: \ RMAN_BAK \ 20111103 \ DF_766232915_4_1.BAK mark = TAG20111103T102639 comment = NONE
Channel t1: Backup set completed. elapsed time: 00: 00: 01
Backup completed from March 11 to April 11
Released channel: t1
2. Non-archive database recovery
RMAN> shutdown immediate
Database closed
Database dismounted
Oracle instance shut down
RMAN> startup mount
Connected to target database (not started)
Oracle instance started
Database mounted
Total System Global Area 535662592 bytes
Fixed Size 1375792 bytes
Variable Size 411042256 bytes
Database Buffers 117440512 bytes
Redo Buffers 5804032 bytes
RMAN> restore database;
Starting restore at 03-NOV-11
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 133 device type = DISK
Channel ORA_DISK_1: starting datafile backup set restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Channel ORA_DISK_1: restoring datafile 00001 to D: \ ORACLE \ ORADATA \ ORCL \ SYSTEM01.DBF
Channel ORA_DISK_1: restoring datafile 00002 to D: \ ORACLE \ ORADATA \ ORCL \ SYSAUX01.DBF
Channel ORA_DISK_1: restoring datafile 00004 to D: \ ORACLE \ ORADATA \ ORCL \ USERS01.DBF
Channel ORA_DISK_1: restoring datafile 00005 to D: \ ORACLE \ ORADATA \ ORCL \ TEST01.DBF channel ORA_DISK_1: restoring datafile 00006 to D: \ ORACLE \ ORADATA \ ORCL \ UNDOTBS02.DBF
Channel ORA_DISK_1: reading from backup piece E: \ RMAN_BAK \ 20111103 \ DF_766235030_5_1.BAK
Channel ORA_DISK_1: piece handle = E: \ RMAN_BAK \ 20111103 \ DF_766235030_5_1.BAK tag = TAG20111103T110349
Channel ORA_DISK_1: restored backup piece 1
Channel ORA_DISK_1: restore complete, elapsed time: 00:02:35
Finished restore at 03-NOV-11
RMAN> alter database open;
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of alter db command at 14:10:03
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'd: \ ORACLE \ ORADATA \ ORCL \ SYSTEM01.DBF'
RMAN> recover database;
Starting recover at 03-NOV-11
Using channel ORA_DISK_1
Starting media recovery
Archived log for thread 1 with sequence 3246 is already on disk as file D: \ ORACLE \ ORADATA \ ORCL \ REDO03.LOG archived log for thread 1 with sequence 3247 is already on disk as file D: \ ORACLE \ ORADATA \ ORCL \ REDO01.LOG
Archived log file name = D: \ ORACLE \ ORADATA \ ORCL \ REDO03.LOG thread = 1 sequence = 3246
Archived log file name = D: \ ORACLE \ ORADATA \ ORCL \ REDO01.LOG thread = 1 sequence = 3247
Media recovery complete, elapsed time: 00:00:09
Finished recover at 03-NOV-11
RMAN> alter database open;
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of alter db command at 14:10:30
The ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
RMAN> alter database open resetlogs;
Database opened
-------------------------------------- Recommended reading --------------------------------------
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------