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

Home -> Community -> Usenet -> c.d.o.server -> Re: Cold backups shell script

Re: Cold backups shell script

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Mon, 25 Nov 2002 20:50:04 GMT
Message-ID: <02wE9.115$Jx6.11247903@newssvr21.news.prodigy.com>


Steven Alfisi wrote:
> I am still having problems getting the shell script listed below to
> work. I have tried putting the $controlfile between single quotes,
> double quotes and just about everything else. I thought this would
> work with the \ based on other people's posts but that is not the
> case. I have tried both the bash shell on linux and ksh on Solaris
> 2.6. What is going on here? Anyone?
>
> logFile='/tmp/logFile.log'
> listFile='/tmp/listFile.log'
> tmpFile='/tmp/tmpFile.log'
>
> su oracle 2>>$logFile >>$logFile <<EOF_SQLPLUS
> /opt/oracle/OraHome1/bin/sqlplus /nolog <<EOF_CONTROLFILE
> connect / as sysdba
> set echo off
> set heading off
> spool $listFile
> select 'cp '||name|| ' /data/oracle/os_backups/homedb' from
> v\$controlfile;
> spool off
> exit
> EOF_CONTROLFILE
> EOF_SQLPLUS
>

It's sqlplus, not the shell, that's giving you trouble. Within sqlplus, you need to do 'set escape on' (by default, sqlplus does not check for escape characters). Received on Mon Nov 25 2002 - 14:50:04 CST

Original text of this message

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