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!

ORA-01187 following rman DUPLICATE

EdStevensJul 26 2016 — edited Jul 27 2016

Oracle 11.2.0.4 SE-One 64-bit

Oracle Linux 5

I have a generic script used for duplicating databases ('refreshing' test from prod) on demand.  It has been working just fine for at least a couple of years now.  Recently I built some vm's with VitrualBox and using the same script on those machines.  When the duplicate finishes with no reported problems, but "SELECT * from dba_temp_files"returns ORA-01187.   There are all kinds of reports of this behavior on the web, and everyone proposes the same post-duplicate fix of recreating the temp file.  But I'd like to understand what causes the issue in the first place and what I should do with my script to prevent it.  It's particularly curious when the same script works just fine on other systems.

Here's the key part of the script:

echo ======================================================================|tee -a $runlog

echo Starting $ORACLE_SID instance NOMOUNT at `date`|tee -a $runlog

echo

$ORACLE_HOME/bin/sqlplus /nolog << EOF5 |tee -a $runlog

connect / as sysdba

#--create spfile from pfile='/backup/$devsid/initdwstg.ora';

startup force nomount;

exit

EOF5

#cd /backup/$ORACLE_SID

rman_ctl=$ORACLE_BASE/admin/${ORACLE_SID}/refresh_${ORACLE_SID}.rmctl

echo "connect catalog ${rmanusr}/${rmanpw}@${rmandb}"   >  $rman_ctl

echo "connect target sys/${prddbpw}@${prddb}"           >> $rman_ctl

echo "connect auxiliary /"                              >> $rman_ctl

#echo "show all;"                                       >> $rman_ctl

echo "run {"                                            >> $rman_ctl

echo "set until scn ${ckptscn};"                        >> $rman_ctl

echo "duplicate target database to ${ORACLE_SID};"      >> $rman_ctl

echo "}"                                                >> $rman_ctl

echo ======================================================================|tee -a $runlog

echo Beginning rman DUPLICATE operation at `date` |tee -a $runlog

echo

$ORACLE_HOME/bin/rman < $rman_ctl |tee -a $runlog

This post has been answered by Mudasir Hakak on Jul 26 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2016
Added on Jul 26 2016
4 comments
898 views