RMAN備份、恢復實驗室 之 備份篇 【歸檔模式】

jackson198574發表於2013-12-13

RMAN備份、恢復實驗室 之 備份篇 【歸檔模式】  
歸檔模式的設定:

如果沒有設定歸檔模式,會出現如下情況:

RMAN> backup database;

Starting backup at 02-AUG-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=9 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 08/02/2013 01:45:49

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 02-AUG-13

channel ORA_DISK_1: finished piece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/04og8fed_1_1 tag=TAG20130802T014548 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 08/02/2013 01:45:49

ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

 

 

開啟歸檔模式(單節點):

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     730714112 bytes

 

Fixed Size                     2216944 bytes

Variable Size                486542352 bytes

Database Buffers             234881024 bytes

Redo Buffers                   7073792 bytes

 

歸檔模式開啟方法:

在RMAN命令符下執行開啟歸檔命令,在sqlplus下直接輸入“alter database archivelog;”回車即可。

RMAN> sql 'alter database archivelog';

 

sql statement: alter database archivelog               --------------歸檔已開啟,當然,你也可以在sqlplus下執行alter database archivelog命令,那樣的話執行結果返回提示更直觀一些,自己動手體驗                                                                                       一把吧,多做比多看更有效果。



歸檔模式已開啟,我們再來備份一下,看看效果如何?

RMAN> backup database;

 

Starting backup at 02-AUG-13

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=10 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=/oracle/app/oradata/ORCL/datafile/o1_mf_system_8xm4839m_.dbf

input datafile file number=00002 name=/oracle/app/oradata/ORCL/datafile/o1_mf_sysaux_8xm483f7_.dbf

input datafile file number=00005 name=/oracle/app/oradata/ORCL/datafile/o1_mf_example_8xm4gzck_.dbf

input datafile file number=00003 name=/oracle/app/oradata/ORCL/datafile/o1_mf_undotbs1_8xm483gd_.dbf

input datafile file number=00004 name=/oracle/app/oradata/ORCL/datafile/o1_mf_users_8xm483jk_.dbf

channel ORA_DISK_1: starting piece 1 at 02-AUG-13

channel ORA_DISK_1: finished piece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/05og8fns_1_1 tag=TAG20130802T015052 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02: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 02-AUG-13

channel ORA_DISK_1: finished piece 1 at 02-AUG-13

piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/06og8fsf_1_1 tag=TAG20130802T015052 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

Finished backup at 02-AUG-13


及時你第一次看著返回結果,很多東西看不明白,但這幾個字眼一目瞭然,告訴我們,資料庫全庫備份成功!~~~   


備份成功了,備份了那些,備份的情況如何怎麼檢視並確認呢?

請看:
RMAN備份、恢復實驗室 之 備份篇 【檢視備份情況】

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

相關文章