This discussion is archived
8 Replies Latest reply: Nov 14, 2012 7:46 AM by 873768 RSS

RMAN backup issue

873768 Newbie
Currently Being Moderated
Hi:

Some time ago we changed backup location from /stage_dir to /rman_back. Since then every day there is an error as below at end.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ch1 channel at 11/13/2012 19:45:18
ORA-19504: failed to create file "/stage_dir/backup/ORALAPPS/grid_control/sp_and_cf/c-3967094687-20121113-00"
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory

This is the backup script. You can see there is no /stage_dir in the script. I can't find anywhere this error is coming from? Please advice.

run {
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
backup as compressed backupset
full filesperset 4 flull_ORCLAPPS_fpk
format '/rman_back/backup/ORCLAPPS/full/db_t%t_s%s_p%p'
database plus archivelog delete input;
backup current controlfile
format '/rman_back/backup/ORCLAPPS/cf/cf_%t_%s_%p'
backup spfile
format '/rman_back/backup/ORCLAPPS/spfile/sp_t%t_s%s_p%p'
release channel ch1;
release channel ch2;
}
EOF
  • 1. Re: RMAN backup issue
    mseberg Guru
    Currently Being Moderated
    ORA-27040 - verify filename, and permissions. Double check the permissions for sure. The directory owner should be your "oracle" user, and the permission should be at least 770.

    Another thing to check is SPACE - You need to check the Filesystem space and ensure that there is enough room within the directory.

    In Linux you can use the "df -k" command to check the number of free blocks on the filesystem.

    Best Regards

    mseberg
  • 2. Re: RMAN backup issue
    rcc50886 Journeyer
    Currently Being Moderated
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of Control File and SPFILE Autobackup command on ch1 channel at 11/13/2012 19:45:18
    ORA-19504: failed to create file "/stage_dir/backup/ORALAPPS/grid_control/sp_and_cf/c-3967094687-20121113-00"
    ORA-27040: file create error, unable to create file
    Linux Error: 2: No such file or directory
    Automatic controlfile backup was enabled on your RMAN configuration.

    If you set CONFIGURE CONTROLFILE AUTOBACKUP to ON, then RMAN automatically creates a control file and an SPFILE backup after you run the BACKUP or COPY commands.

    to change the location of controlfile/spfile autobackup location use following parameter:

    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT '<path>'

    or else you can simply turn off the AUTOMATIC BACKUP OF CONTROLFILE/SPFILE as your script has explicit backup of it.

    -Thanks
  • 3. Re: RMAN backup issue
    873768 Newbie
    Currently Being Moderated
    Thank you both. We have good backup every day (I think) just have this error every day. How to check if Automatic controlfile backup was enabled? How to check the default location?
  • 4. Re: RMAN backup issue
    rcc50886 Journeyer
    Currently Being Moderated
    How to check if Automatic controlfile backup was enabled? How to check the default location?
    connect to target and catalog (if you have)
    $ rman target=/ 
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Wed Nov 14 09:07:58 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: DB_NAME (DBID=xxxxxxxxxx)
    
    RMAN> show CONTROLFILE AUTOBACKUP;   --> it will gives you if autobackup on/off
    
    RMAN> show CONTROLFILE AUTOBACKUP FORMAT;   -->it will provide the location
    post results.
  • 5. Re: RMAN backup issue
    873768 Newbie
    Currently Being Moderated
    Output:

    RMAN> show CONTROLFILE AUTOBACKUP;

    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;

    RMAN> show CONTROLFILE AUTOBACKUP FORMAT;

    RMAN configuration parameters are:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/stage_dir/ackup/ORALAPPS/grid_control/sp_and_cf/%F';

    I see the problem. How to fix it?
  • 6. Re: RMAN backup issue
    Lukas Bica Explorer
    Currently Being Moderated
    Just change path in autobackup:

    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'rman_back/backup/ORCLAPPS/sp_and_cf/%F';

    This will change path of autobackup - it includes spfile + control file

    Lukas
  • 7. Re: RMAN backup issue
    rcc50886 Journeyer
    Currently Being Moderated
    Output:
    
    RMAN> show CONTROLFILE AUTOBACKUP;
    
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    
    RMAN> show CONTROLFILE AUTOBACKUP FORMAT;
    
    RMAN configuration parameters are:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/stage_dir/ackup/ORALAPPS/grid_control/sp_and_cf/%F';
    
    I see the problem. How to fix it?
    set the CONTROLFILE AUTOBACKUP FORMAT to desired disk location. as per your script all controlfiles are backed up to following directory: "/rman_back/backup/ORCLAPPS/cf"

    you may want to set the AUTOBACKUP OF CONTROLFILE to same directoty.

    here is the rman command to change the location:
    RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/rman_back/backup/ORCLAPPS/cf/%F';
  • 8. Re: RMAN backup issue
    873768 Newbie
    Currently Being Moderated
    Thank you very much!!!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points