Verify that the RMAN backup set corresponding to the control file, archive file, and data file of different BLOCK sizes are not in the same PIECE

Source: Internet
Author: User

Verify that the RMAN backup set corresponding to the control file, archive file, and data file of different BLOCK sizes are not in the same PIECE
To prove this experiment, --- database version 11.2.0.3.
In RMAN backup, archiving logs, control files, and data files cannot be stored in the same backup set, because the backup set of the data file is in the smallest unit of volume el data blocks,
The size of the control file block is 16384,16 K. The backup set of the archived log file is also the minimum operating system block, which is 512 bytes.
Therefore, the backup set for archiving log files, the backup set for controlling files, and the backup set for data files cannot be in the same backup set.
--- When all the above are default parameters, you can use parameters such as piece = N or maxpiecesize = 1 GB to adjust them.
It turns out that after the preceding steps, you can create tablespaces of different block sizes and test tablespaces of different block sizes. The tablespaces cannot be backed up to the same backup PIECE.
######################
Experiment 1: Verify that the backup set of archive log files, control file backup set, and data file backup set cannot be in the same backup set.
Size of data files, control files, and log file blocks in the current database:
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
####### Backup test:
You can see that the backup set of the archive file, the backup set of the data file, and the backup set of the control file are not in the same backup 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_eclipseq_15.260.877627115 RECID = 1 STAMP = 877627122
Archived log file name = + FLASH/bys9/archivelog/2015_05_12/thread_eclipseq_16.261.879547905 RECID = 2 STAMP = 879547905
Archived log file name = + FLASH/bys9/archivelog/2015_05_12/thread_eclipseq_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_eclipseq_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.36 m 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.22 m 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 259310 12-MAY-15 259604 12-MAY-15

BS Key Size Device Type Elapsed Time Completion Time
-------------------------------------------------------
3 4.00 k 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.60 m 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

##########





######################
Experiment 2: Create tablespaces of different block sizes and test tablespaces of different block sizes. They cannot be backed up to the same backup 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/test100004k.266.879548657 4096
6 + DATA01/bys9/datafile/test1000016k.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_eclipseq_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_eclipseq_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.03 m 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.50 k 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.00 k 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.58 m 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.01 m 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.03 m 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






Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.