background image
<< End the Online Backup | Get the userdump >>
<< End the Online Backup | Get the userdump >>

Create a pfile if using spfile

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create a PFILE if Using an SPFILE on the Primary Site
Remote Mirroring of an Oracle Database Using Data Replicator Software
D-9
ALTER DATABASE BACKUP CONTROLFILE TO '${ORA_DUMP}/
backup_control.ctl' REUSE;
ALTER DATABASE BACKUP CONTROLFILE TO trace;
exit
EOF
CONTROL=`ls -t ${ORA_DUMP}/*.trc | head -1`
if [ ! -z "$CONTROL" ]; then
grep 'CONTROL' ${CONTROL} 1> /dev/null
if test $? -eq 0; then
cp ${CONTROL} ${ORA_DUMP}/backup_control.sql
fi
fi
cntl_start=`grep -n -w 'STARTUP NOMOUNT' ${ORA_DUMP}/
backup_control.sql | head -1 | awk -F':' '{print $1}'`
cntl_end=`grep -n -w '\-\- End of tempfile' ${ORA_DUMP}/
backup_control.sql | head -1 | awk -F':' '{print $1}'`
head -${cntl_end} ${ORA_DUMP}/backup_control.sql | tail
+${cntl_start} | sed '/^--/d' > ${ORA_DUMP}/
startup_backup_control.sql
if [ -f ${ORA_DUMP}/startup_backup_control.sql ]
then
echo 0
else
echo 1
fi
Create a PFILE if Using an SPFILE on the Primary
Site
#!/bin/ksh
#-----------------------------------------------------------
# create a pfile if using spfile
#-----------------------------------------------------------
ORACLE_SID=$1
ORACLE_HOME=$2
export ORACLE_SID
export ORACLE_HOME
SPFILE_LOCATION=`${ORACLE_HOME}/bin/sqlplus -s <<EOF
/ as sysdba
set heading off
set feedback off
SELECT value
FROM v\\$parameter