- Oracle Database 12c Backup and Recovery Survival Guide
- Francisco Munoz Alvarez Aman Sharma
- 531字
- 2021-04-02 10:19:57
The NOARCHIVELOG mode
When your database is created by default, it will be created using the NOARCHIVELOG
mode. This mode permits any normal database operations but will not provide your database with the capability to perform any point-in-time recovery operations or online backups of your database.
When the database is using this mode, no hot backup is possible (hot backup is any backup done with the database open, causing no interruption for the users). You will only be able to perform backups with your database down (shutdown, also known as the offline backup or the cold backup), and you will only be able to perform a full recovery up to the point that your backup was made. You can see in the following example what will happen if you try to make a hot backup of your database when in the NOARCHIVELOG
mode:
SQL> SELECT log_mode FROM v$database; LOG_MODE ------------ NOARCHIVELOG SQL> ALTER DATABASE BEGIN BACKUP; ALTER DATABASE BEGIN BACKUP * ERROR at line 1: ORA-01123: cannot start online backup; media recovery not enabled
The error shown in the preceding code is the result you will receive after trying to place your database in backup mode to make a hot backup of your database files. The example to follow shows the result you will receive when trying to make a backup of your open database when in the NOARCHIVELOG
mode using RMAN
. As you can see, neither approach is possible:
RMAN> BACKUP DATABASE; Starting backup at 04-DEC-12 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=36 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/04/2012 15:32:42 ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode continuing other job steps, job failed will not be re-run channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 04-DEC-12 channel ORA_DISK_1: finished piece 1 at 04-DEC-12 piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/201 2_12_04/o1_mf_ncsnf_TAG20121204T153241_8cx20wfz_.bkp tag=TAG20121204T153241 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 RMAN-00571: ====================================================== RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ====================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/04/2012 15:32:42 ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
To make a full backup of your database when in the NOARCHIVELOG
mode, you will need to:
- First shut down your database completely in a consistent mode.
- Backup all your datafiles, parameter files, a control file, and your redo logs manually to a tape or a different location.
- Re-start your database.
If a recovery is required, all you will need to do is to restore all files from your last backup and start the database, but you need to understand that all transactions made in the database after your backup will be lost.
- 零基礎PHP學習筆記
- Python 深度學習
- PHP+MySQL網站開發技術項目式教程(第2版)
- Visual Basic程序設計實驗指導(第二版)
- Mastering openFrameworks:Creative Coding Demystified
- Go語言從入門到精通
- Android Studio開發實戰:從零基礎到App上線 (移動開發叢書)
- Java Hibernate Cookbook
- PHP+MySQL Web應用開發教程
- AngularJS UI Development
- Mastering Python
- 系統分析師UML用例實戰
- Flutter for Beginners
- C#網絡程序開發(第二版)
- 3D Printing Designs:Fun and Functional Projects