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: Need Help...

Re: Need Help...

From: Sybrand Bakker <gooiditweg_at_sybrandb.nospam.demon.nl>
Date: Thu, 27 Nov 2003 19:14:17 +0100
Message-ID: <imfcsv4tlesamh8ijq106k7hq5bqnga2o8@4ax.com>


On 27 Nov 2003 09:07:57 -0800, ovimani_at_hotmail.com (Mamun Shaheed) wrote:

>Hi, I am running oracle9i on Linux 7.3.
>I have a script file running as cron job. the file is as follows
>
>==========
>#!/bin/sh
>clear
>LOGFILE="log_`date +%Y%m%d`"
>
>if [ ! -e /u08/Scripts/anomalies/$LOGFILE ] ; then
> touch /u08/Scripts/anomalies/$LOGFILE
>fi
>echo "*Anomalies in Database on `date +%D`*" >> /u08/Scripts/anomalies/$LOGFILE
>
>/u01/app/oracle/product/9.2.0/bin/sqlplus -s sa/ora123 << EOF_XTBL
>
>spool /u08/Scripts/anomalies/output.log
>
>select ani, custservice.modifieduserid
>from custservice
>where not exists (select 'x' from cust where cust.custid=custservice.custid)
>and serviceid=1
>and (ani like '0%' and length(ani)=9);
>
>spool off;
>
>
>!echo "<<--Custservice without Customer-->>" >> /u08/Scripts/anomalies/$LOGFILE
>!cat /u08/Scripts/anomalies/output.log >> /u08/Scripts/anomalies/$LOGFILE
>EOF_XTBL
>
>=========
>
>But I am getting following error mail from cron.
>
>=========
>Subject: Cron <oracle_at_localhost> /u08/Scripts/anomalies/monitor >
> /u08/Scripts/anomalies/monitor.err
>
>TERM environment variable not set.
>Error 6 initializing SQL*Plus
>Message file sp1<lang>.msb not found
>SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
>===========
>
>
>How can I fixed this problem.
>
>
>~MS

Your .profile is not being called when you login using cron

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu Nov 27 2003 - 12:14:17 CST

Original text of this message

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