首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

Linux 上oracle备份失败?

2012-09-11 
Linux 下oracle备份失败????准备在 /u01/app/oracle/RmanBackup 路径下执行备份脚本 BackupFull.shRmanBac

Linux 下oracle备份失败????
准备在 /u01/app/oracle/RmanBackup 路径下执行备份脚本 BackupFull.sh
 RmanBackup执行权限:
ls-l:
drwxrwxrwx 2 oracle oinstall 4096 Jul 12 13:12 RmanBackup
 
在执行时:[oracle@richard RmanBackup]$ ./BackupFull.sh
 报错:
 [oracle@richard RmanBackup]$ ./BackupFull.sh
 Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jul 12 13:12:58 2012
 Copyright (c) 1982, 2005, Oracle. All rights reserved.
 connected to target database: OMS (DBID=1473522592)
 RMAN>
 RMAN> 2> 3> 4> 5> 6> 7>
 using target database control file instead of recovery catalog
 allocated channel: c1
 channel c1: sid=861 devtype=DISK
 Starting backup at 12-JUL-12
 channel c1: starting incremental level 0 datafile backupset
 channel c1: specifying datafile(s) in backupset
 input datafile fno=00001 name=/u01/app/oracle/oradata/oms/system01.dbf
 input datafile fno=00003 name=/u01/app/oracle/oradata/oms/sysaux01.dbf
 input datafile fno=00002 name=/u01/app/oracle/oradata/oms/undotbs01.dbf
 input datafile fno=00004 name=/u01/app/oracle/oradata/oms/users01.dbf
 input datafile fno=00005 name=/u01/app/oracle/oradata/oms/bank_data01.dbf
 channel c1: starting piece 1 at 12-JUL-12
 released channel: c1
[color=#000080] RMAN-00571: ===========================================================
 RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
 RMAN-00571: ===========================================================
 RMAN-03009: failure of backup command on c1 channel at 07/12/2012 13:13:01
 ORA-19504: failed to create file "/u01/app/oracle/product/10.2.0/db_1/dbs/u01/app/oracle/db0_OMS_20120712_32"
 ORA-27040: file create error, unable to create file
 Linux Error: 2: No such file or directory[/color]
 
请问是执行权限问题还是什么问题?
 =========================================================================================
 在 RMAN> backup database format='u01/app/oracle/RmanBackup/bakTest.bak'; 这样尝试时还是报类似错误:
 RMAN> backup database format='u01/app/oracle/RmanBackup/bakTest.bak';
 Starting backup at 12-JUL-12
 using target database control file instead of recovery catalog
 allocated channel: ORA_DISK_1
 channel ORA_DISK_1: sid=869 devtype=DISK
 channel ORA_DISK_1: starting full datafile backupset
 channel ORA_DISK_1: specifying datafile(s) in backupset
 input datafile fno=00001 name=/u01/app/oracle/oradata/oms/system01.dbf
 input datafile fno=00003 name=/u01/app/oracle/oradata/oms/sysaux01.dbf
 input datafile fno=00002 name=/u01/app/oracle/oradata/oms/undotbs01.dbf
 input datafile fno=00004 name=/u01/app/oracle/oradata/oms/users01.dbf
 input datafile fno=00005 name=/u01/app/oracle/oradata/oms/bank_data01.dbf
 channel ORA_DISK_1: starting piece 1 at 12-JUL-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/12/2012 13:19:28
ORA-19504: failed to create file "/u01/app/oracle/product/10.2.0/db_1/dbs/u01/app/oracle/RmanBackup/bakTest.bak"
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
 
===============================================================================================
附BackupFull.sh:[size=12px][/size]
 
#script:BackupFull.sh
 #creater:Richard
 #date:2012/7/30
 #desc:backup all database datafile in archive with rman


 #connect database
 export ORACLE_BASE=/u01/app/oracle
 export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
 export ORACLE_SID=oms
 export PATH=$ORACLE_HOME/bin:$PATH
 rman target/ <<EOF_RMAN
 run{
 allocate channel c1 type disk;
 backup incremental level 0 tag 'db0' format 'u01/app/oracle/RmanBackup/db0_%d_%T_%s'
 database include current controlfile;
 delete noprompt obsolete;
 release channel c1;
 }
 #end

[解决办法]
ls -l /u01/app/oracle/product/10.2.0/db_1/dbs/u01/app/oracle/db0_OMS_20120712_32
看看这个文件是不是存在
包括整个路径是否存在,貌似路径不存在是最大嫌疑。
最后看看执行这个SHELL的用户是否对整个目录路径具有r+x的权限。

热点排行