Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Rman - created file already exists

Rman - created file already exists

From: Schauss, Peter <peter.schauss_at_ngc.com>
Date: Tue, 8 May 2007 11:44:43 -0400
Message-ID: <6591F529444E9748A546718B3D1A67010701A4CC@xcgv2605.northgrum.com>


I have an rman script which have been using on 8.1.7.4 for several years, but when I run it on 10.2.0.2.0 I get the following error message for each channel:

RMAN-03009: failure of backup command on ch1 channel at 05/08/2007 09:32:03
ORA-19504: failed to create file
"/ora10/oradata/orabkup/peregrine/hot_copies/peregrine_070508093147_1.rb k"
ORA-27038: created file already exists

My script is shown below. I have played around with the format such as adding a %p after the channel number in the file name, but I still get the same error. Any suggestions?

Thanks,
Peter Schauss



#!/bin/ksh
#
# rman_bkup.ksh
#
# Backup a database using rman
#

echo " "
echo " * set Oracle environment variables " export PATH=${PATH}:/usr/local/bin

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
export BACKUP_DIR=/ora10/oradata/orabkup/$1/hot_copies
export BACKUP_DIR2=/ora10/oradata/orabkup/$1/hot_copies
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=$1

echo " "

signon=`cat $ORACLE_BASE/maint/dba.ctl/dba.$1`
#

BASE_NAME=`date +$1_%y%m%d%H%M%S`
#

rman target $signon nocatalog <<EOF
run {

allocate channel ch1 type disk format '$BACKUP_DIR/${BASE_NAME}_1.rbk';
allocate channel ch2 type disk format '$BACKUP_DIR/${BASE_NAME}_2.rbk';
allocate channel ch3 type disk format '$BACKUP_DIR/${BASE_NAME}_3.rbk';
allocate channel ch4 type disk format '$BACKUP_DIR/${BASE_NAME}_4.rbk';
allocate channel ch5 type disk format '$BACKUP_DIR/${BASE_NAME}_5.rbk';
allocate channel ch6 type disk format '$BACKUP_DIR/${BASE_NAME}_6.rbk';
backup database;
sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
}
exit
EOF
#
# Backup the control file which now contains a record
# of this backup.
#

sqlplus $signon <<EOF
alter database backup controlfile to
'$BACKUP_DIR/${BASE_NAME}_control.bak';
exit
EOF
#
--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 08 2007 - 10:44:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US