[20121126]backup as copy datafile 1的问题.txt

[20121126]backup as copy datafile 1的问题.txt

SQL> select * from v$version where rownum<=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle11g/product/11.2.0/db_1/dbs/snapcf_test.f'; # default

在使用rman备份的时候,为什么出现如下提示呢?
RMAN> backup as copy datafile 1 format '/data/testtest/system01.dbf';
Starting backup at 2012-11-26 11:33:19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle11g/oradata/test/system01.dbf
output file name=/data/testtest/system01.dbf tag=TAG20121126T113322 RECID=3 STAMP=800364837
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
copying current control file
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/26/2012 11:33:59
ORA-01580: error creating control backup file /data/testtest/system01.dbf
ORA-27038: created file already exists
Additional information: 1
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2012-11-26 11:33:59
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/26/2012 11:34:00
ORA-19504: failed to create file "/data/testtest/system01.dbf"
ORA-27038: created file already exists
Additional information: 1

--这是备份或者as copy datafile 1文件时,要自动做control file以及spfile文件的备份。而以上format的格式已经设置死了,就是
--format '/data/testtest/system01.dbf',由于文件已经存在,备份控制文件以及spfile文件失败。出现如上的错误。

--如果这样写,问题就不存在了。

RMAN> backup as copy datafile 1 format '/data/testtest/system01_%U.dbf';

Starting backup at 2012-11-26 11:39:59
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle11g/oradata/test/system01.dbf
output file name=/data/testtest/system01_data_D-TEST_I-2071943378_TS-SYSTEM_FNO-1_0lnr96kh.dbf tag=TAG20121126T114000 RECID=4 STAMP=800365230
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/data/testtest/system01_cf_D-TEST_id-2071943378_0mnr96ll.dbf tag=TAG20121126T114000 RECID=5 STAMP=800365241
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2012-11-26 11:40:45
channel ORA_DISK_1: finished piece 1 at 2012-11-26 11:40:46
piece handle=/data/testtest/system01_0nnr96lt_1_1.dbf tag=TAG20121126T114000 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012-11-26 11:40:46

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-749954/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/267265/viewspace-749954/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值