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備份整庫和歸檔日誌的方法
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- rman開啟備份優化對備份歸檔的影響優化
- ORACLE NBU調取oracle rman指令碼備份歸檔不自動刪除歸檔Oracle指令碼
- dg丟失歸檔,使用rman增量備份恢復
- 教你在Linux中如何歸檔和備份Linux
- SQL資料庫怎麼進行資料歸檔和歸檔管理?SQL資料庫
- 使用RMAN增量備份處理Dataguard因歸檔丟失造成的gap
- oracle 如何不備份已經備份的歸檔Oracle
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- 在Linux中,如何進行備份或歸檔檔案(tar 命令)?Linux
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- RAC開啟資料庫歸檔資料庫
- 從備份片中恢復某個指定得歸檔或者資料檔案
- LightBD/PostgreSQL資料庫設定歸檔保留時間SQL資料庫
- oracle rman 刪除過期的歸檔Oracle
- iOS 複雜物件的歸檔與反歸檔iOS物件
- Polardb-O資料庫歸檔配置資料庫
- RMAN正確地刪除Archivelog以及設定有備庫的歸檔刪除策略Hive
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- 使用RMAN備份資料庫資料庫
- Oracle資料庫歸檔模式的切換ELOracle資料庫模式
- rman 還原歸檔日誌(restore archivelogRESTHive
- Sybase或SQLServer資料庫分批歸檔方案SQLServer資料庫
- oracle adg主庫通過rman無法刪除歸檔Oracle
- [重慶思莊每日技術分享]-備庫使用RMAN獲得歸檔日誌
- DM7使用DMRMAN執行歸檔備份
- 對歸檔模式下CLEAR 未歸檔日誌後恢復資料庫的一點看法模式資料庫
- 利用RMAN備份重建資料庫資料庫
- 【RMAN】在備庫執行rman備份時報錯RMAN-06820 ORA-17629
- pt-archiver資料歸檔Hive
- pt-archiver 歸檔資料Hive
- MySQL 中如何歸檔資料MySql
- 達夢資料庫歸檔方式及其配置方法資料庫
- oracle資料庫歸檔日誌量陡增分析Oracle資料庫
- Dedecms備份的資料檔案位置及備份資料庫的方法資料庫
- RMAN-ERROR:因為找不到過期和丟失的歸檔日誌而備份失敗Error