[20171225]RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect.txt

本文通过三个测试案例详细解析了在Oracle RMAN备份过程中出现的RMAN-06808错误:SECTIONSIZE不能与MAXPIECESIZE同时使用的问题。展示了如何避免这两个互斥选项导致的备份失败。

[20171225]RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect.txt

--//朋友拿我的一些例子来测试遇到的RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect问题.
$ oerr rman 6808
6808, 1, "SECTION SIZE cannot be used when piece limit is in effect"
// *Cause:  The SECTION SIZE backup option was used together with the
//          MAXPIECESIZE channel limit.
//          These options are mutually exclusive, because they are independant
//          methods of creating multiple backup pieces with one backup command.
// *Action: Use one option or the other, but not both.

--//实际上并不是我测试中disk rate设置问题,而是通道设置中存在maxpiecesize参数,在使用SECTION SIZE时存在冲突,
--//在我的测试环境演示看看.

1.环境:
SCOTT@book> @ &r/ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


2.测试一:
--//设置maxpiecesize=200M rate=50M:
RMAN> CONFIGURE CHANNEL device type disk maxpiecesize=200M rate=50M;

old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M RATE 50 M;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M RATE 50 M;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3

RMAN> backup as   backupset  section size 10M datafile 6 format '/home/oracle/backup/data6_%U';

Starting backup at 2017-12-25 12:08:20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=119 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=132 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/25/2017 12:08:20
RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect

3.测试二:

RMAN> CONFIGURE CHANNEL device type disk maxpiecesize=200M ;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M;
new RMAN configuration parameters are successfully stored

RMAN> show channel ;
RMAN configuration parameters for database with db_unique_name BOOK are:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M;

RMAN> backup as   backupset  section size 10M datafile 6 format '/home/oracle/backup/data6_%U';
Starting backup at 2017-12-25 14:51:23
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=119 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=132 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/25/2017 14:51:24
RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect

--//显然MAXPIECESIZE设置与section size参数存在冲突.

4.测试三:
RMAN> CONFIGURE CHANNEL device type disk clear;

old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M;
old RMAN configuration parameters are successfully deleted
released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3

RMAN> show channel ;
RMAN configuration parameters for database with db_unique_name BOOK are:
RMAN configuration has no stored or default parameters

RMAN> backup as   backupset  section size 10M datafile 6 format '/home/oracle/backup/data6_%U';
Starting backup at 2017-12-25 14:53:14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=119 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=132 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/25/2017 14:53:14
RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect

--//退出rman然后进入就ok了.

RMAN> backup as   backupset  section size 10M datafile 6 format '/home/oracle/backup/data6_%U';
Starting backup at 2017-12-25 14:53:46
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=119 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=132 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/mnt/ramdisk/book/tea01.dbf
channel ORA_DISK_1: starting piece 1 at 2017-12-25 14:53:47
channel ORA_DISK_1: finished piece 1 at 2017-12-25 14:53:48
piece handle=/home/oracle/backup/data6_nrsn0unr_1_1 tag=TAG20171225T145347 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-12-25 14:53:48

Starting Control File and SPFILE Autobackup at 2017-12-25 14:53:48
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_12_25/o1_mf_s_963672828_f4183wgb_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2017-12-25 14:53:49

--//重复测试:
RMAN> CONFIGURE CHANNEL device type disk maxpiecesize=200M ;
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 200 M;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
released channel: ORA_DISK_2
released channel: ORA_DISK_3

RMAN> backup as   backupset  section size 10M datafile 6 format '/home/oracle/backup/data6_%U';

Starting backup at 2017-12-25 14:58:52
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=28 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=119 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=132 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/25/2017 14:58:52
RMAN-06808: SECTION SIZE cannot be used when piece limit is in effect

--//这样应该可以证明是maxpiecesize参数与SECTION SIZE存在冲突.

转载于:https://www.cnblogs.com/lfree/p/8116724.html

### 关于RMAN-03002 和 RMAN-06564 错误的解决方案 当执行 `restore spfile` 命令时遇到 RMAN-03002 或 RMAN-06564 错误,通常表明存在配置文件路径不匹配、权限不足或其他环境设置问题。以下是针对这些错误的具体分析和解决方法。 #### 1. **RMAN-03002: Failure of Restore Command** 此错误表示恢复操作未能成功完成。可能的原因包括目标数据库未启动到适当的状态(如 NOMOUNT),或者指定的目标位置不可访问。为了修复该问题: - 确认当前实例已处于 NOMOUNT 状态。如果尚未达到这一状态,则需通过 SQL*Plus 执行如下命令来调整实例模式: ```sql STARTUP NOMOUNT; ``` - 验证用于存储 SPFILE 的目录是否存在以及具有足够的写入权限。例如,在尝试从 `/home/oracle/spfilebak.old` 恢复之前,应确认该路径有效并可由 Oracle 用户读取[^2]。 #### 2. **RMAN-06564 Error Analysis and Resolution** 对于 RMAN-06564 错误,其主要成因在于控制文件或参数文件中的某些条目损坏或丢失。具体措施如下: - 如果是从备份集中还原 SPFILE 并遭遇上述异常情况,可以考虑重新创建一个新的初始化参数文件 (PFILE),再基于它生成新的服务器端参数文件(SPFILE)。步骤大致如下所示: ```bash # 创建 PFILE CREATE PFILE='/path/to/new_pfile' FROM MEMORY; # 使用新建立起来的 PFILE 来构建 SPFILE CREATE SPFILE='/new/location/spfile.ora' FROM PFILE='/path/to/new_pfile'; ``` - 同样需要注意的是,任何涉及文件系统的更改都应当确保操作系统层面的相关安全策略得到满足,比如 SELinux 设置等[^3]。 综上所述,处理此类问题的关键在于仔细检查每一个环节——从基础架构层面上看是否有硬件故障影响到了数据一致性;从中间件角度出发排查网络连接状况是否稳定正常运行;最后回到应用本身深入挖掘日志记录寻找蛛丝马迹加以排除。 ```python # 示例 Python 脚本验证文件路径有效性 import os def check_path(path): if not os.path.exists(path): raise FileNotFoundError(f"The specified path {path} does not exist.") check_path('/home/oracle/spfilebak.old') ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值