I suppose I should add that you can also have the backup script "dot" the
env script.
For example:

----- backup_script.ksh -----
#!/usr/bin/ksh

. /path/to/env_script

etc.
etc.
etc.
---------------------------

> -----Original Message-----
> From: Stephen Lee [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 8:49 AM
> To: Multiple recipients of list ORACLE-L
> Subject: RE: RMAN and cron
> 
> 
> 
> Are you executing (or running) the env variable script; then 
> running the
> backup script?  If so, then the env script sets the variables 
> OK ... in the
> sub-shell that ran it!  When that sub-shell finishes the env 
> script, then
> your variables exit with the sub-shell.  If this is what you 
> have going on,
> then put the variable in the same script as the backup, or 
> "dot" the env
> script.
> 
>  . env_script
>  /execute/the/backup
> 
> 
> > -----Original Message-----
> > From: Ron Rogers [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 23, 2002 8:24 AM
> > To: Multiple recipients of list ORACLE-L
> > Subject: RMAN and cron
> > 
> > 
> > list,
> >  Cron server os RedHat 7.2
> >  Database server os OpenVMS 7.3-1
> >  Database Oracle 8.1.7 rel 3
> >  Rman server os OpenVMS 7.3-1
> >  Rman Oracle 8.1.7 rel 3
> >  
> >  On the Cron server I have created a script that will backup the
> > database server and catalog the action on the rman server. 
> > When I try to
> > have cron perform the backup sctipt I get 
> > RMAN-571 and LEM-00031, and LEM-00033 error message. According to
> > Metalink it is an environmental error that the oracle 
> > variables are not
> > set. I have set up my environment as follows:
> > 
> > file:  /alphaprd/profile
> >     ORACLE_HOME =  cron server ORACLE_HOME
> >     ORACLE_BASE =cron server ORACLE_BASE
> >     LD_LIBRARY_PATH = cron server LD_LIBRARY_PATH
> >    TNS_ADMIN = cron server TNS_ADMIN
> >  export ORACLE_HOME ORACLE_BASE LD_LIBRARY_PATH TNS_ADMIN
> > 
> > Script to backup the database controlfile: test.sh
> > 
> > ./alphaprd/profile
> > echo "start backup:" >/alphaprd/rman_test.log
> > /home/oracle/OraHome1/bin/rman <<EOF>> /alphaprd/rman_test.log
> > connect target "sys/password@database server"
> > connect catalog rman/rman@rman server
> > run {
> > allocate channel di type disk;
> > backup format
> > 'orabck:[backups]control_%U.bus'
> > (current controlfile);
> > }
> > EOF
> > 
> > Crontab entry as ROOT:
> > 10 01 * * 1 su oracle "-c /alphaprd/test.sh -u"
> > 
> > OR 
> > Crontab entry as ORACLE
> > 10 01 * * 1 /alphaprd/test.sh
> > 
> > The script functions properly if I run it from the command line as
> > oracle but fails with
> > RMAN-571 and LEM-00031 and LEM-00033 errors when run from cron.
> > 
> > I don't see how it could be Oracle environmentals when I am 
> running it
> > as an Oracle cron and the target and catalog are on a 
> different server
> > that the cron server.
> > Can you point me in the direction where I can get this resovled?
> > Thanks,
> > Ron
> > -- 
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > -- 
> > Author: Ron Rogers
> >   INET: [EMAIL PROTECTED]
> > 
> > Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> > San Diego, California        -- Mailing list and web 
> hosting services
> > 
> ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
> > 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Stephen Lee
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephen Lee
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to