rman在歸檔與非歸檔時備份資料庫的簡單示例
oracle10g
如果資料庫是非歸檔模式只有資料庫在mount狀態下才能進行備份
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2030368 bytes
Variable Size 1090520288 bytes
Database Buffers 5335154688 bytes
Redo Buffers 14745600 bytes
在nomount狀態下是不能備份的
RMAN> backup database;
Starting backup at 31-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/31/2012 14:22:22
ORA-01507: database not mounted
在mount狀態下能進行備份
SQL> alter database mount;
Database altered.
RMAN> backup database;
Starting backup at 31-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00005 name=/u01/app/oracle/oradata/jytest/hygeia.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/jytest/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/jytest/undotbs01.dbf
input datafile fno=00001 name=/u01/app/oracle/oradata/jytest/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/jytest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_nnndf_TAG20121031T142300_891jy4yv_.bkp tag=TAG20121031T142300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_ncsnf_TAG20121031T142300_891k8co4_.bkp tag=TAG20121031T142300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 31-OCT-12
如果資料庫是歸檔模式資料庫能在open和mount狀態下能進行備份
SQL> startup
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2030368 bytes
Variable Size 1090520288 bytes
Database Buffers 5335154688 bytes
Redo Buffers 14745600 bytes
Database mounted.
Database opened.
RMAN> backup database;
Starting backup at 31-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00005 name=/u01/app/oracle/oradata/jytest/hygeia.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/jytest/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/jytest/undotbs01.dbf
input datafile fno=00001 name=/u01/app/oracle/oradata/jytest/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/jytest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_nnndf_TAG20121031T142300_892jy4yv_.bkp tag=TAG20121031T142301 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_ncsnf_TAG20121031T142300_891k8co4_.bkp tag=TAG20121031T142300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 31-OCT-12
SQL> startup mount
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2030368 bytes
Variable Size 1090520288 bytes
Database Buffers 5335154688 bytes
Redo Buffers 14745600 bytes
Database mounted.
RMAN> backup database;
Starting backup at 31-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00005 name=/u01/app/oracle/oradata/jytest/hygeia.dbf
input datafile fno=00003 name=/u01/app/oracle/oradata/jytest/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/jytest/undotbs01.dbf
input datafile fno=00001 name=/u01/app/oracle/oradata/jytest/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/jytest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_nnndf_TAG20121031T142300_893jy4yv_.bkp tag=TAG20121031T142302 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:05:25
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 31-OCT-12
channel ORA_DISK_1: finished piece 1 at 31-OCT-12
piece handle=/u01/app/oracle/flash_recovery_area/JYTEST/backupset/2012_10_31/o1_mf_ncsnf_TAG20121031T142300_891k8co4_.bkp tag=TAG20121031T142300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 31-OCT-12
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-748007/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 非歸檔資料庫RMAN備份資料庫
- RMAN在歸檔/非歸檔,庫關閉/mounted/開啟狀態下的備份
- rman 非歸檔模式下停庫備份與恢復模式
- RMAN恢復(rman只備份資料庫,但不備份歸檔,歸檔透過簡單的rsync或scp來傳送到異地備份)資料庫
- rman 非歸檔模式下open庫備份與mount恢復模式
- 非歸檔模式下的資料備份模式
- rman全庫備份備份歸檔日誌檔案
- oracle RMAN 非歸檔資料庫恢復Oracle資料庫
- Oracle的奇葩設定之非歸檔模式與RMAN備份Oracle模式
- ORACLE資料庫歸檔改為非歸檔Oracle資料庫
- RMAN備份資料檔案+控制檔案+歸檔日誌
- RMAN說,我能備份(5)--RMAN備份歸檔檔案
- rman備份但丟失一個資料檔案,但有歸檔備份
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- RMAN備份整庫和歸檔日誌的方法
- 資料庫備份與恢復(使用歸檔後滾)資料庫
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- RMAN備份歸檔日誌多份 %c
- Backup And Recovery User's Guide-備份資料庫-備份處於非歸檔模式的資料庫GUIIDE資料庫模式
- rman備份後為什麼要同時備份歸檔日誌
- 將Oracle資料庫改為歸檔模式並啟用Rman備份Oracle資料庫模式
- RMAN備份歸檔日誌指令碼指令碼
- Oracle 歸檔與非歸檔模式的更改Oracle模式
- 歸檔日誌大小 與使用rman 備份後的歸檔日誌產生的備份集大小的關係
- RMAN資料庫恢復 之歸檔模式有(無)備份-丟失資料檔案的恢復資料庫模式
- 非歸檔模式恢復資料庫模式資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份處於非歸檔模式的資料庫GUIIDE模式資料庫
- oracle 歸檔/非歸檔Oracle
- 歸檔模式與非歸檔模式的切換模式
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- 基於非歸檔的冷備份恢復
- 備份&恢復之四:非歸檔模式下的備份與恢復模式
- Backup And Recovery User's Guide-備份資料庫-使用RMAN備份歸檔重做日誌GUIIDE資料庫
- 恢復之非歸檔模式下資料庫非正常關閉的備份與恢復模式資料庫
- Oracle RAC 歸檔與非歸檔切換Oracle
- Backup And Recovery User's Guide-從RMAN開始-備份資料庫-備份處於歸檔模式的資料庫GUIIDE資料庫模式
- Backup And Recovery User's Guide-備份處於非歸檔模式的資料庫GUIIDE模式資料庫