驗證控制檔案、歸檔檔案、不同BLOCK大小的資料檔案對應的RMAN備份集不在同一PIECE
RMAN備份中,歸檔日誌、控制檔案和資料檔案不能放在同一個備份集裡,因為資料檔案所在的備份集以Oracel 資料塊為最小單位,
而控制檔案塊大小為作為16384,16K。歸檔日誌檔案所在的備份集也是以作業系統塊為最小單位,此處為512位元組。
所以歸檔日誌檔案備份集、控制檔案備份集和資料檔案備份集不能在同一個備份集裡面。
---以上都是預設引數時的,當然可以使用piece=N或者maxpiecesize=1g之類引數來調整。
證明以上以後,建立不同塊大小的表空間,測試不同塊大小的表空間,也不能備份到同一個備份PIECE中。
######################
實驗一:驗證歸檔日誌檔案備份集、控制檔案備份集和資料檔案備份集不能在同一個備份集裡面
當前資料庫中資料檔案、控制檔案、日誌檔案塊大小:
SQL> col name for a50
SQL> select file#,name,block_size from v$datafile;
FILE# NAME BLOCK_SIZE
---------- -------------------------------------------------- ----------
1 +DATA01/bys9/datafile/system.260.876770855 8192
2 +DATA01/bys9/datafile/sysaux.261.876770927 8192
3 +DATA01/bys9/datafile/undotbs1.262.876770987 8192
4 +DATA01/bys9/datafile/users.264.876771015 8192
SQL> select members,bytes/1024/1024 M,blocksize from v$log;
MEMBERS M BLOCKSIZE
---------- ---------- ----------
2 50 512
2 50 512
2 50 512
SQL> select name,block_size from v$controlfile;
NAME BLOCK_SIZE
-------------------------------------------------- ----------
+DATA01/bys9/controlfile/current.256.876770817 16384
+FLASH/bys9/controlfile/current.256.876770821 16384
########備份測試情況:
可以看到歸檔檔案的備份集、資料檔案的備份集、控制檔案的備份集是不在同一個備份PIECE中。
RMAN> backup database format "/home/oracle/full_%d_%T_%s"
2> plus archivelog delete all input;
Starting backup at 12-MAY-15
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=41 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=15 RECID=1 STAMP=877627122
input archived log thread=1 sequence=16 RECID=2 STAMP=879547905
input archived log thread=1 sequence=17 RECID=3 STAMP=879548073
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t225434_0.263.879548075 tag=TAG20150512T225434 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FLASH/bys9/archivelog/2015_04_21/thread_1_seq_15.260.877627115 RECID=1 STAMP=877627122
archived log file name=+FLASH/bys9/archivelog/2015_05_12/thread_1_seq_16.261.879547905 RECID=2 STAMP=879547905
archived log file name=+FLASH/bys9/archivelog/2015_05_12/thread_1_seq_17.262.879548073 RECID=3 STAMP=879548073
Finished backup at 12-MAY-15
Starting backup at 12-MAY-15
using channel ORA_DISK_1
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=+DATA01/bys9/datafile/system.260.876770855
input datafile file number=00002 name=+DATA01/bys9/datafile/sysaux.261.876770927
input datafile file number=00003 name=+DATA01/bys9/datafile/undotbs1.262.876770987
input datafile file number=00004 name=+DATA01/bys9/datafile/users.264.876771015
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=/home/oracle/full_BYS9_20150512_2 tag=TAG20150512T225442 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 12-MAY-15
Starting backup at 12-MAY-15
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=18 RECID=4 STAMP=879548173
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t225614_0.261.879548175 tag=TAG20150512T225614 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FLASH/bys9/archivelog/2015_05_12/thread_1_seq_18.262.879548173 RECID=4 STAMP=879548173
Finished backup at 12-MAY-15
Starting Control File and SPFILE Autobackup at 12-MAY-15
piece handle=+FLASH/bys9/autobackup/2015_05_12/s_879548179.262.879548187 comment=NONE
Finished Control File and SPFILE Autobackup at 12-MAY-15
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4 Full 9.36M DISK 00:00:09 12-MAY-15
BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20150512T225618
Piece Name: +FLASH/bys9/autobackup/2015_05_12/s_879548179.262.879548187
Control File Included: Ckp SCN: 259666 Ckp time: 12-MAY-15
RMAN> list backup of archivelog all;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1 11.22M DISK 00:00:03 12-MAY-15
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20150512T225434
Piece Name: +FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t225434_0.263.879548075
List of Archived Logs in backup set 1
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 15 214735 11-APR-15 239087 21-APR-15
1 16 239087 21-APR-15 259310 12-MAY-15
1 17 259310 12-MAY-15 259604 12-MAY-15
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
3 4.00K DISK 00:00:02 12-MAY-15
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20150512T225614
Piece Name: +FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t225614_0.261.879548175
List of Archived Logs in backup set 3
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 18 259604 12-MAY-15 259652 12-MAY-15
RMAN> list backup of database;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 434.60M DISK 00:01:20 12-MAY-15
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20150512T225442
Piece Name: /home/oracle/full_BYS9_20150512_2
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 259619 12-MAY-15 +DATA01/bys9/datafile/system.260.876770855
2 Full 259619 12-MAY-15 +DATA01/bys9/datafile/sysaux.261.876770927
3 Full 259619 12-MAY-15 +DATA01/bys9/datafile/undotbs1.262.876770987
4 Full 259619 12-MAY-15 +DATA01/bys9/datafile/users.264.876771015
##########
######################
實驗二:建立不同塊大小的表空間,測試不同塊大小的表空間,也不能備份到同一個備份PIECE中。
SQL> select file#,name,block_size from v$datafile;FILE# NAME BLOCK_SIZE
---------- -------------------------------------------------- ----------
1 +DATA01/bys9/datafile/system.260.876770855 8192
2 +DATA01/bys9/datafile/sysaux.261.876770927 8192
3 +DATA01/bys9/datafile/undotbs1.262.876770987 8192
4 +DATA01/bys9/datafile/users.264.876771015 8192
5 +DATA01/bys9/datafile/test1_4k.266.879548657 4096
6 +DATA01/bys9/datafile/test1_16k.267.879548689 16384
RMAN> backup as compressed backupset database include current controlfile plus archivelog delete all input;
Starting backup at 12-MAY-15
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=9 STAMP=879549561
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t231922_0.265.879549563 tag=TAG20150512T231922 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FLASH/bys9/archivelog/2015_05_12/thread_1_seq_23.264.879549561 RECID=9 STAMP=879549561
Finished backup at 12-MAY-15
Starting backup at 12-MAY-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA01/bys9/datafile/system.260.876770855
input datafile file number=00002 name=+DATA01/bys9/datafile/sysaux.261.876770927
input datafile file number=00003 name=+DATA01/bys9/datafile/undotbs1.262.876770987
input datafile file number=00004 name=+DATA01/bys9/datafile/users.264.876771015
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.264.879549565 tag=TAG20150512T231925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA01/bys9/datafile/test1_4k.266.879548657
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.260.879549591 tag=TAG20150512T231925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA01/bys9/datafile/test1_16k.267.879548689
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.261.879549595 tag=TAG20150512T231925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting compressed 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 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/ncsnf0_tag20150512t231925_0.262.879549601 tag=TAG20150512T231925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 12-MAY-15
Starting backup at 12-MAY-15
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=24 RECID=10 STAMP=879549604
channel ORA_DISK_1: starting piece 1 at 12-MAY-15
channel ORA_DISK_1: finished piece 1 at 12-MAY-15
piece handle=+FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t232004_0.266.879549605 tag=TAG20150512T232004 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FLASH/bys9/archivelog/2015_05_12/thread_1_seq_24.263.879549603 RECID=10 STAMP=879549604
Finished backup at 12-MAY-15
-----------
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
21 Full 1.03M DISK 00:00:04 12-MAY-15
BP Key: 21 Status: AVAILABLE Compressed: YES Tag: TAG20150512T231925
Piece Name: +FLASH/bys9/backupset/2015_05_12/ncsnf0_tag20150512t231925_0.262.879549601
Control File Included: Ckp SCN: 261966 Ckp time: 12-MAY-15
RMAN> list backup of archivelog all;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
17 9.50K DISK 00:00:01 12-MAY-15
BP Key: 17 Status: AVAILABLE Compressed: YES Tag: TAG20150512T231922
Piece Name: +FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t231922_0.265.879549563
List of Archived Logs in backup set 17
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 23 261837 12-MAY-15 261945 12-MAY-15
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
22 3.00K DISK 00:00:02 12-MAY-15
BP Key: 22 Status: AVAILABLE Compressed: YES Tag: TAG20150512T232004
Piece Name: +FLASH/bys9/backupset/2015_05_12/annnf0_tag20150512t232004_0.266.879549605
List of Archived Logs in backup set 22
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 24 261945 12-MAY-15 261973 12-MAY-15
RMAN> list backup of database;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
18 Full 101.58M DISK 00:00:23 12-MAY-15
BP Key: 18 Status: AVAILABLE Compressed: YES Tag: TAG20150512T231925
Piece Name: +FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.264.879549565
List of Datafiles in backup set 18
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 261954 12-MAY-15 +DATA01/bys9/datafile/system.260.876770855
2 Full 261954 12-MAY-15 +DATA01/bys9/datafile/sysaux.261.876770927
3 Full 261954 12-MAY-15 +DATA01/bys9/datafile/undotbs1.262.876770987
4 Full 261954 12-MAY-15 +DATA01/bys9/datafile/users.264.876771015
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
19 Full 1.01M DISK 00:00:03 12-MAY-15
BP Key: 19 Status: AVAILABLE Compressed: YES Tag: TAG20150512T231925
Piece Name: +FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.260.879549591
List of Datafiles in backup set 19
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
5 Full 261963 12-MAY-15 +DATA01/bys9/datafile/test1_4k.266.879548657
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
20 Full 1.03M DISK 00:00:02 12-MAY-15
BP Key: 20 Status: AVAILABLE Compressed: YES Tag: TAG20150512T231925
Piece Name: +FLASH/bys9/backupset/2015_05_12/nnndf0_tag20150512t231925_0.261.879549595
List of Datafiles in backup set 20
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
6 Full 261965 12-MAY-15 +DATA01/bys9/datafile/test1_16k.267.879548689
相關文章
- RMAN備份資料檔案+控制檔案+歸檔日誌
- RMAN說,我能備份(4)--RMAN備份資料檔案和控制檔案
- rman備份-(1) 利用備份級恢復資料檔案和控制檔案
- RMAN說,我能備份(5)--RMAN備份歸檔檔案
- 如何刪除控制檔案中過去rman備份到磁帶的歸檔備份集
- 不完全恢復(資料檔案備份--新建表空間--控制檔案備份--日誌歸檔檔案)
- RMAN 驗證 資料檔案 和 備份 的有效性
- rman全庫備份備份歸檔日誌檔案
- 無處不在的Oracle資料庫控制檔案備份Oracle資料庫
- rman備份但丟失一個資料檔案,但有歸檔備份
- RMAN恢復表空間,資料檔案,歸檔檔案,控制檔案等介紹
- 歸檔模式有備份丟失控制檔案和資料檔案後恢復模式
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle
- 【備份】RMAN中對控制檔案的幾種備份方法
- rman恢復資料庫--用備份的控制檔案資料庫
- 備份歸檔日誌檔案
- rman備份檔案的格式
- 只有rman備份集,控制檔案丟失的恢復
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- 把資料庫控制檔案備份到跟蹤檔案資料庫
- 使用logmnr,在RMAN備份檔案中恢復備份的歸檔日誌檔案進行分析
- 備份控制檔案
- 歸檔模式,恢復沒有備份的資料檔案模式
- Backup And Recovery User's Guide-使用RMAN備份控制檔案-對控制檔案進行手工備份GUIIDE
- 【備份恢復】利用 備份控制檔案到指定目錄下的控制檔案 恢復控制檔案
- RMAN備份檔案格式
- 使用舊的控制檔案備份來恢復控制檔案
- RMAN備份檔案遠大於資料庫大小的原因分析資料庫
- 【dbfsize】使用dbfsize命令得到資料檔案、控制檔案及日誌檔案的Block SizeBloC
- 歸檔日誌大小 與使用rman 備份後的歸檔日誌產生的備份集大小的關係
- Oracle使用備份檔案集恢復歸檔日誌Oracle
- 非歸檔無備份下控制檔案丟失的恢復
- dbms_backup_restore包恢復控制檔案,資料檔案,歸檔檔案的測試案例REST
- RMAN備份與恢復(新舊控制檔案及歸檔日誌)測試
- rman備份丟失控制檔案恢復
- 還原sqlserver資料庫備份檔案.bak的檔案SQLServer資料庫
- 備份之控制檔案備份