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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: crontab script problem

Re: crontab script problem

From: David A. Barbour <dbarbour_at_nucentrix.net>
Date: Fri, 13 Apr 2001 23:59:49 -0700
Message-ID: <F001.002E9A7E.20010414000021@fatcity.com>

Rajesh,

Instead of running the .profile for the oracle user, you might try invoking the oracle user. I don't think you're seeing the $ORACLE_HOME. Try something like:

        su - oracle "-c sqlplus -s"<<END
        system/manager
        END   
        @/oracle/test2.sql

Hope this helps.

David A. Barbour
Oracle DBA, OCP

Rajesh Dayal wrote:
>
> Hi All,
>
> I am facing some problem while running sqlplus
> scripts from crontab. Env is Tru64 Unix 4.0f and
> Oracle 7.2.3.
> Through crontab all system commands run fine,
> but when I try to invoke sqlplus, it gives following
> error:
>
> /oracle/test1.sh: -o: bad option(s)
>
> Also I have executed .profile of Oracle user
> in the beginning of command. The commands written
> in /oracle/test1.sh is as follows,
>
> . /oracle/product/723/.profile
> sqlplus -s system/manager @/oracle/test2.sql
>
> Any help/suggestion would be greatly appreciated.
>
> TIA,
> Rajesh
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Rajesh Dayal
> INET: Rajesh_at_ohitelecom.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (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.com
-- 
Author: David A. Barbour
  INET: dbarbour_at_nucentrix.net

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (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).
Received on Sat Apr 14 2001 - 01:59:49 CDT

Original text of this message

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