Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

rman-02001 unrecognized punctuation symbol "+"

vxwo0owxvMar 31 2014 — edited Apr 10 2014

Greeting Gurus

we try to use rman to do a copy via the asm

The copy works in the interactive rman prompt

but it stops working when we try to put into a script to pass parameters via shell

Below is the script. Thanks so much for the help.

#cp_dat_file.rman start

connect target /

run

{

sql 'alter tablespace &1 read only';

copy datafile '&2' to '&4';

}

#cp_dat_file.rman end

and heres the shell script that calls above

#cp_dat_file.sh start

HDRC=HDR2

HDRN=HDR1

HDR_DAT_FILE_DIR=`+DATA1/testdb/datafile/'

mytime=`date +"%Y%m%d%H%M%S"`

HDRC_TBS_NM=`echo $HDRC"_TBS"`

HDRN_TBS_NM=`echo $HDRN"_TBS"`

HDR_SRC_DAT_FILE='+DATA1/testdb/datafile/hdr_20140331164410.dbf'

HDR_DST_DAT_FILE=`echo $HDR_DAT_FILE_DIR"hdr_"$mytime".dbf"`

rman <<EOF

@cp_dat_file.rman $HDRN_TBS_NM $HDR_SRC_DAT_FILE $HDRC_TBS_NM $HDR_DST_DAT_FILE

#cp_dat_file.rman end

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 8 2014
Added on Mar 31 2014
1 comment
1,912 views