Chinaunix首页 | 论坛 | 博客
  • 博客访问: 102173
  • 博文数量: 26
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-06 01:47
文章分类

全部博文(26)

文章存档

2009年(7)

2008年(19)

我的朋友

分类: Oracle

2009-03-23 03:59:30

1,备份集backup set
存储备份信息的逻辑结构,仅仅是备份信息的逻辑结构而已,通俗说就是存储这个备份集里面都是备份了哪些数据文件以及这个备份集的大小,备份的时间,备份片的信息等信息,通俗的说相当于
一本书的序+目录.
 
2,备份片backup piece
存储备份集信息的二进制文件.备份集由一个或多个备份片组成,并且每个备份片对应一个OS文件.
 
3,数据文件可以跨备份片,不能跨备份集。
  3.1 比如说你定义备份集的MAXSETSIZE参数,该参数的最小值必须大于你所备份的数据文件中最大的数据文件的大小。就是说如果你要备份的所有数据文件中最大的那个文件是350M,那MAXSETSIZE
必须大于1G。这个参数默认是没有限制的。
RMAN>CONFIGURE MAXSETSIZE TO UNLIMITED;

可以修改 RMAN> CONFIGURE MAXSETSIZE TO 500M;
这里就可以看出数据文件不能跨备份集。
  3.2 假如定义备份片的大小,要定义maxpiecesize参数,你可以定义每个备份片300M,这样你的一个备份集就会有多个备份片。因为仅仅350M的那个数据文件就会被分为两个备份片。由此可以看出
数据文件可以跨备份片。
 
4. filesperset 2 指每个backupset 2个file,即2个物理文件
 
让我们做个试验来说明一下:
 

 

RMAN> CONFIGURE MAXSETSIZE TO 400M;
old RMAN configuration parameters:
CONFIGURE MAXSETSIZE TO UNLIMITED;
new RMAN configuration parameters:
CONFIGURE MAXSETSIZE TO 400 M;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> run{
allocate channel d1 type disk
maxpiecesize = 300M;
backup
filesperset 2
format='/u01/app/bak/db_%t_%p.bus'
database;
}

allocated channel: d1
channel d1: sid=135 devtype=DISK
Starting backup at 2009-03-23:03:42:17
released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 03/23/2009 03:42:17
RMAN-06183: datafile or datafile copy larger than MAXSETSIZE: file# 1 /u01/app/oracle/oradata/orcl/system01.dbf
这证明了MAXSETSIZE参数的最小值必须大于你所备份的数据文件中最大的数据文件的大小
RMAN> CONFIGURE MAXSETSIZE TO 500M;
old RMAN configuration parameters:
CONFIGURE MAXSETSIZE TO 400 M;
new RMAN configuration parameters:
CONFIGURE MAXSETSIZE TO 500 M;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> run{
allocate channel d1 type disk
maxpiecesize = 300M;
backup
filesperset 2
format='/u01/app/bak/db_%t_%p.bus'
database;
}
allocated channel: d1
channel d1: sid=135 devtype=DISK
Starting backup at 2009-03-23:03:43:19
channel d1: starting full datafile backupset
channel d1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel d1: starting piece 1 at 2009-03-23:03:43:19
channel d1: finished piece 1 at 2009-03-23:03:44:04
piece handle=/u01/app/bak/db_682227799_1.bus tag=TAG20090323T034319 comment=NONE
channel d1: starting piece 2 at 2009-03-23:03:44:04
channel d1: finished piece 2 at 2009-03-23:03:44:11
piece handle=/u01/app/bak/db_682227799_2.bus tag=TAG20090323T034319 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:52
channel d1: starting full datafile backupset
channel d1: specifying datafile(s) in backupset
input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
channel d1: starting piece 1 at 2009-03-23:03:44:12
channel d1: finished piece 1 at 2009-03-23:03:44:47
piece handle=/u01/app/bak/db_682227852_1.bus tag=TAG20090323T034319 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:35
channel d1: starting full datafile backupset
channel d1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel d1: starting piece 1 at 2009-03-23:03:44:49
channel d1: finished piece 1 at 2009-03-23:03:44:50
piece handle=/u01/app/bak/db_682227887_1.bus tag=TAG20090323T034319 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:03
Finished backup at 2009-03-23:03:44:50
released channel: d1

RMAN> list backup;

List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------

1602 Full 356.28M DISK 00:00:52 2009-03-23:03:44:11
  List of Datafiles in backup set 1602
  File LV Type Ckp SCN Ckp Time Name
  ---- -- ---- ---------- ------------------- ----

  1 Full 638357 2009-03-23:03:43:19 /u01/app/oracle/oradata/orcl/system01.dbf
  4 Full 638357 2009-03-23:03:43:19 /u01/app/oracle/oradata/orcl/users01.dbf
  Backup Set Copy #1 of backup set 1602
  Device Type Elapsed Time Completion Time Compressed Tag
  ----------- ------------ ------------------- ---------- ---

  DISK 00:00:52 2009-03-23:03:44:10 NO TAG20090323T034319
    List of Backup Pieces for backup set 1602 Copy #1
    BP Key Pc# Status Piece Name
    ------- --- ----------- ----------

    1607 1 AVAILABLE /u01/app/bak/db_682227799_1.bus
    1608 2 AVAILABLE /u01/app/bak/db_682227799_2.bus
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------

1603 Full 195.37M DISK 00:00:29 2009-03-23:03:44:41
        BP Key: 1609 Status: AVAILABLE Compressed: NO Tag: TAG20090323T034319
        Piece Name: /u01/app/bak/db_682227852_1.bus
  List of Datafiles in backup set 1603
  File LV Type Ckp SCN Ckp Time Name
  ---- -- ---- ---------- ------------------- ----

  2 Full 638375 2009-03-23:03:44:12 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  3 Full 638375 2009-03-23:03:44:12 /u01/app/oracle/oradata/orcl/sysaux01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------

1604 Full 6.80M DISK 00:00:02 2009-03-23:03:44:49
        BP Key: 1610 Status: AVAILABLE Compressed: NO Tag: TAG20090323T034319
        Piece Name: /u01/app/bak/db_682227887_1.bus
  Control File Included: Ckp SCN: 638392 Ckp time: 2009-03-23:03:44:47
  SPFILE Included: Modification time: 2009-03-21:15:22:56

阅读(7560) | 评论(0) | 转发(0) |
0

上一篇:RMAN恢复时的时间格式

下一篇:没有了

给主人留下些什么吧!~~