官术网_书友最值得收藏!

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

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

To make a full backup of your database when in the NOARCHIVELOG mode, you will need to:

  1. First shut down your database completely in a consistent mode.
  2. Backup all your datafiles, parameter files, a control file, and your redo logs manually to a tape or a different location.
  3. 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.

主站蜘蛛池模板: 志丹县| 桂阳县| 临沭县| 嵩明县| 泾川县| 裕民县| 香格里拉县| 卓资县| 乌什县| 温泉县| 镇坪县| 开封县| 芮城县| 定州市| 远安县| 岳西县| 西吉县| 塔河县| 汨罗市| 隆昌县| 丰城市| 拉萨市| 锡林郭勒盟| 五原县| 灌云县| 昭通市| 巴塘县| 浮山县| 德州市| 三亚市| 晋宁县| 白河县| 小金县| 军事| 宜昌市| 旺苍县| 汶川县| 年辖:市辖区| 宣城市| 民权县| 临武县|