小弟在linux下备份oracle数据库(版本11g),出现这个问题。RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/07/2008 22:17:28
ORA-19504: failed to create file "/backup1/backup_0jjq1bjm_1_1"
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory
channel ORA_DISK_1 disabled, job failed on it will be run on another channel
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 09/07/2008 22:17:29
ORA-19504: failed to create file "/backup2/backup_0kjq1bjo_1_1"
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory小弟对linux不是很熟悉,虽然看出说是不存在目录,请问我要在什么地方去创建目录?

解决方案 »

  1.   

    确认是否存在这个目录: /backup1
    并且有读写权限.
      

  2.   

    明显的oracle用户没有指定路径的写权限/backup1/backup_0jjq1bjm_1_1
      

  3.   

    或者你把备份路径指定到oracle下面试试看backup database format=/opt/oracle/...../
      

  4.   

    请问我应该将backup1这个目录建在什么地方,是oracle的目录下吗?
      

  5.   

    这是我的rman配置
    RMAN configuration parameters for database with db_unique_name ORCL are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup1/ctl_%F';
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/backup1/backup_%U';
    CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/backup2/backup_%U';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/db_1/dbs/snapcf_orcl.f'; # default
      

  6.   

    我在oracle的根目录下建了backup1,和backup2两个目录后,没在报刚才的错,报的错变为RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/07/2008 23:07:                                              13
    ORA-19504: failed to create file "/backup1/backup_0ljq1eh1_1_1"
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory
    channel ORA_DISK_1 disabled, job failed on it will be run on another channel
    RMAN-03009: failure of backup command on ORA_DISK_2 channel at 09/07/2008 23:07:                                              13
    ORA-01013: user requested cancel of current operation
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_2: starting archived log backup set
    channel ORA_DISK_2: specifying archived log(s) in backup set
    input archived log thread=1 sequence=57 RECID=12 STAMP=664839844
    input archived log thread=1 sequence=58 RECID=14 STAMP=664840138
    input archived log thread=1 sequence=59 RECID=16 STAMP=664840599
    input archived log thread=1 sequence=60 RECID=17 STAMP=664841845
    input archived log thread=1 sequence=61 RECID=18 STAMP=664844830
    channel ORA_DISK_2: starting piece 1 at 07-SEP-08
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup plus archivelog command at 09/07/2008 23:07:16
    ORA-19504: failed to create file "/backup2/backup_0mjq1eh2_1_1"
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory仔细看下,发现这次报的是backup2,请问是怎么回事?
      

  7.   

    CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT  '/opt/oracle/oradata/backup1/backup_%U'; 
    CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT  '/opt/oracle/oradata/backup2/backup_%U';创建
    /opt/oracle/oradata/backup1
    /opt/oracle/oradata/backup2
    文件夹再做一遍
      

  8.   


    Starting backup at 07-SEP-08
    current log archived
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    channel ORA_DISK_1: starting archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=59 RECID=16 STAMP=664840599
    input archived log thread=1 sequence=60 RECID=17 STAMP=664841845
    input archived log thread=1 sequence=61 RECID=18 STAMP=664844830
    channel ORA_DISK_1: starting piece 1 at 07-SEP-08
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/07/2008 23:53:                                              54
    ORA-19504: failed to create file "/backup1/backup_0tjq1h8i_1_1"
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory
    channel ORA_DISK_1 disabled, job failed on it will be run on another channel
    channel ORA_DISK_2: starting archived log backup set
    channel ORA_DISK_2: specifying archived log(s) in backup set
    input archived log thread=1 sequence=52 RECID=2 STAMP=664838617
    input archived log thread=1 sequence=53 RECID=4 STAMP=664838862
    input archived log thread=1 sequence=54 RECID=6 STAMP=664839060
    input archived log thread=1 sequence=55 RECID=8 STAMP=664839118
    input archived log thread=1 sequence=56 RECID=10 STAMP=664839229
    input archived log thread=1 sequence=57 RECID=12 STAMP=664839844
    input archived log thread=1 sequence=58 RECID=14 STAMP=664840138
    channel ORA_DISK_2: starting piece 1 at 07-SEP-08
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup plus archivelog command at 09/07/2008 23:53:54
    ORA-19504: failed to create file "/backup2/backup_0ujq1h8i_1_1"
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory还是报错
      

  9.   

    那为大大给我说下你们在linux下的步骤啊,说详细下,我愿意加分啊
      

  10.   

    哪就这么写一个试试看
    Rman>backup database format=/opt/oracle/oradata/oracle_test;
    直接指定路径文件来备份试试看,再出错就见鬼了
      

  11.   

    我在oracle的根目录下建了backup1,和backup2两个目录后,... ...
    =============================================================oracle的根目录?
    ===================================================
    你是不是在oracle的家目录下建立了两个文件夹啊?
    应该建在根目录(/)下,通常oracle用户是没有权限在/ 下建立目录的。可以先用 root 用户建立目录,然后用 chown 将目录的 owner 修改成 oracle 用户。
      

  12.   

    我觉得是路径权限的问题,可能oracle用户没有操作/backup1 目录的权限。