failure of release command at channel: c1 not allocated

RMAN> run{allocate channel c1 type disk; backup full database format '/opt/bak0_%s_%p_%t'; release channel c1;}

allocated channel: c1
channel c1: sid=143 devtype=DISK

Starting backup at 24-APR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/tmp/EAS_D_QM01_STANDARD.ora
input datafile fno=00007 name=/opt/EAS_D_MEN1_STANDARD.ora
input datafile fno=00008 name=/opt/data1/EAS60GOLD_DATA.dbf
input datafile fno=00009 name=/opt/data1/EAS_D_STANDARD.dbf
input datafile fno=00002 name=/opt/oracle/oradata/quanmai/undotbs01.dbf
input datafile fno=00001 name=/opt/oracle/oradata/quanmai/system01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/quanmai/sysaux01.dbf
input datafile fno=00005 name=/opt/oracle/oradata/quanmai/example01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/quanmai/users01.dbf
channel ORA_DISK_1: starting piece 1 at 24-APR-12
channel ORA_DISK_1: finished piece 1 at 24-APR-12
piece handle=/opt/bak0_3_1_781462215 tag=TAG20120424T165015 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 24-APR-12
channel ORA_DISK_1: finished piece 1 at 24-APR-12
piece handle=/opt/bak0_4_1_781462540 tag=TAG20120424T165015 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 24-APR-12

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of release command at 04/24/2012 16:55:44
RMAN-06012: channel: c1 not allocated

解决方式:
Select Name,STATUS From  v$datafile;
查看发现数据文件的状态在offline和recover状态修复后正常

 

如果无法创建如下(来自http://www.ochef.net/tag/rmanora-19504ora-27038):
RMAN-03009: failure of backup command on c1 channel at 08/04/2009 08:34:43

ORA-19504: failed to create file “/home/oracle/backup/full2009_08_A”

ORA-27038: created file already exists

错误分析几个步骤:
错误中指定要创建的文件已经,而实际上是并不存在,也没有用先前的备份的数据恢复过数据库。考虑是不是在OS层面删除过备份文件,而没有在RMAN中更新,试着更新RMAN:

RMAN>crosscheck archivelog all;
RMAN>delete expired archivelog all;
RMAN>crosscheck backup;
RMAN>delete expired backup;
做了更新之后,问题依旧。

2.会不会是目录(/home/oracle/backup)权限的问题,修改目录权限:
#chmod –R 775 /home/oracle/backup
再执行备份,问题仍旧。
3.试着让oracle自动分配通道,但配置RMAN的并行度为2
RMAN>configure device type disk parallelism2;

尝试着再次备份,问题仍然是channel c2没有分配通道。

解决方式:增加%U参数后再次尝试备份:
RMAN> run{allocate channel c1 type disk; backup full database format '/opt/bak0%Y_%M_%U_A'; release channel c1;}
解决文章参考
原文如下:

Solution Description:

=====================

Insert a %U into the format portion of the backup script in order to ensure a unique backup file name.

Problem Explanation:

====================

These errors occur because a backup file name already exists by the name specified in you backup script. For instance, if you are using the line “allocate channel c1 type disk format

‘/oracle/database/rman/backup/df_%d_%p_%c’;”, df_%d_%p_%c formats the backupstring like so;

df_ is simply a name. This could be any set of characters. In this case it means

database full.

%d_ is the database sid.

%p_is the backup piece number within the backup set.

%c_ specifies the copy number of the backup piece within a set of duplexed backup pieces.

There needs to be a %U added to the format string.

%U_ specifies a convenient shorthand that guarantees uniqueness in generated backup filenames. So, if the string were “db_%d_%U_%p_%c a unique name would be generated and it would not be necessary to either rename or move the backup file name prior to the next backup.

If the format is changed to include the %U, for instance;

allocate channel c1 type disk format ‘/oracle/database/rman/backup/df_%d_%U_%p_%c’;

The backup file will automatically have a unique name generated like;

df_JTG_0eblfm65_1_1_1_1

The next one would look like;

df_JTG_0fblfm76_1_1_1_1

翻译:
解决方案描述:
=====================
插入一%到格式部分的备份脚本以保证一个独特的备份文件名。
问题解答:
====================
这些错误的发生是因为一个备份文件名已存在于指定的名称在您的备份脚本。例如,如果您使用的是线”分配渠道Cl型磁盘格式
“/数据/数据库/中/备份/ df_ % d_ % p_ %”;“,df_ % d_ % p_ %的backupstring格式一样;
df_只是一个名字。这可以是任何字符集。在这种情况下它
数据库已满。
% d_是数据库。
% p_is备份数的备份集。
% c_指定的拷贝数的备份片内的一套全双工备份片。
需要有一%个你添加到格式字符串。
% u_指定一个方便的速记保证唯一性在生成的备份文件名。所以,如果字符串“db_ % % % % d_ u_ p_独特的名字会产生,就没有必要重命名或移动备份文件的名称之前,下一个备份。
如果格式化包括%,例如;
分配渠道Cl型磁盘格式/开发/数据库/中/备份/ df_ % % % % d_ u_ p_ ';
备份文件将自动有一个唯一的名称产生像;
df_jtg_0eblfm65_1_1_1_1
下一个看起来像;
df_jtg_0fblfm76_1_1_1_1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值