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: Problem /w Export Script on Unix

Re: Problem /w Export Script on Unix

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Thu, 30 Dec 1999 20:38:05 -0500
Message-ID: <386C08FC.6FE1CDDC@bigfoot.com>


Sometimes for these sorts of problems I make an additional source file like

.oraenv2 that contains a portion of your environment shell your using (like
.profile, .login or whatever) , and then source it in the script. like .
.oraenv2

Sybrand Bakker wrote:

> Most likely your environment variables are incorrect. Your profile doesn't
> run in cron.
> As you are using sqlnet instead of ipc (@$4), the only thing you need to do
> is set $ORACLE_HOME and $TNS_ADMIN as they are set in an ordinary shell.
>
> Hth,
>
> --
> Sybrand Bakker, Oracle DBA
> John2k <john2k_at_usa.com> wrote in message
> news:heOa4.21644$Mg.322402_at_c01read03-admin.service.talkway.com...
> > I've a bit of problem with a couple of Unix Scripts I wrote to do a
> > scheduled export from Oracle.
> >
> > The first script figures out appropraite parameters and passes them to
> > the second script, which does the actual export. The problem is that
> > the process works fine only when I run the script as user oracle from
> > the command line. But, if I schedule the same exact command, as user
> > oracle, to run from cron, the process fails in EXP line, giving me a
> > System Error 32.
> >
> > I'm runnin Oracle 8.0.4 on HPux 10.20 and my database has grown so
> > large that I can not do a simple export (i.e. I do not have enough
> > contigous space to do an export dump and then compress the dump), so
> > I've tried to use a pipe file to zip the output from export, as the
> > data comes out! Anyhow, here is the code:
> >
> > Call from first shell script to second:
> >
> > /home/dba/bckup_cycle/exp.sh /u01/db1/db1_pipe /u01/db1/db1_exp.dmp.gz
> > passwd dbname /u01/dba/db1_exp.log
> >
> > The second script file: exp.sh
> > ----------------------------------
> > mknod $1 p
> > ll $1
> > gzip < $1 > $2 &
> > exp userid=system/$3@$4 buffer=1024000 full=y file=$1 log=$5
> > rm $1
> > ----------------------------------
> >
> > Any ideas?
> >
> > Thanks.
> > --
> > Free audio & video emails, greeting cards and forums
> > Talkway - http://www.talkway.com - Talk more ways (sm)
> >
Received on Thu Dec 30 1999 - 19:38:05 CST

Original text of this message

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