關於RAMN能不能再非歸檔模式下進行備份的問題

DB_BLOCK發表於2013-11-04

在OCP的考試中,有一道題目就是RMAN一定要在歸檔模式下進行備份,是否正確的一道題。


 我們就針對這個問題,做以下驗證


RMAN到底在非歸檔時能不能進行備份。
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /u01/app/oracle/products/11.2.0/dbs/arch
Oldest online log sequence     56
Current log sequence           58

RMAN> backup database;

Starting backup at 05-OCT-13
using channel ORA_DISK_1
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 10/05/2013 15:44:47
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 05-OCT-13
channel ORA_DISK_1: finished piece 1 at 05-OCT-13
piece handle=/u01/app/oracle/products/11.2.0/dbs/02ollcvg_1_1 tag=TAG20131005T154446 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 10/05/2013 15:44:47
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

我們可以看到,備份失敗了,那麼,我們知道,在資料庫是開啟的情況下,時刻都有讀寫,所以,我們在open情況下用RMAN備份資料庫,哪怕就是備份了,也是沒有用的。
那麼我們在mount的時候能不能備份呢?
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount;
ORACLE instance started.

Total System Global Area  622149632 bytes
Fixed Size                  2230912 bytes
Variable Size             503317888 bytes
Database Buffers          113246208 bytes
Redo Buffers                3354624 bytes
Database mounted.

oracle@Ray:/home/oracle>rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Oct 5 15:58:35 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORA11G (DBID=4213800794, not open)

RMAN> backup database;

Starting backup at 05-OCT-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ora11g/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/ora11g/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ora11g/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ora11g/users01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/panfeng01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/ora11g/undo01.dba
input datafile file number=00006 name=/u01/app/oracle/oradata/ora11g/panfeng01.dbf
channel ORA_DISK_1: starting piece 1 at 05-OCT-13
channel ORA_DISK_1: finished piece 1 at 05-OCT-13
piece handle=/u01/app/oracle/products/11.2.0/dbs/03olldq5_1_1 tag=TAG20131005T155859 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:26
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 05-OCT-13
channel ORA_DISK_1: finished piece 1 at 05-OCT-13
piece handle=/u01/app/oracle/products/11.2.0/dbs/04olle4c_1_1 tag=TAG20131005T155859 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 05-OCT-13


在mount狀態時,備份不會出現錯誤,所以,在mount狀態時可以在非歸檔模式下進行備份,但是,他和冷備沒有區別。



歡迎大家批評指正:
QQ交流群:300392987
論        壇:www.oraclefreebase.com

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29210156/viewspace-775648/,如需轉載,請註明出處,否則將追究法律責任。

相關文章