Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help, what's going wrong?
your .profile is not executed in a cron job, so you don't have your env variables set.
Hth,
Sybrand Bakker, Oracle DBA
"Stanley" <stanley_woo_at_yahoo.com> wrote in message
news:92c1p5$s3m129_at_imsp212.netvigator.com...
> Hi,
> I'm newbie to oracle, just wrote a perl script to insert some data into
> database daily. It doesn't work and with error message as below. But
worked
> fine if executed the script under ksh. Enclosed with
>
> part of code :-
> sub connect_DB
> {
> use DBI;
> $DSN = "DBI:Oracle:CCS1";
> $user = "ccsdba";
> $pw = "ccsdba";
> $dbh = DBI->connect($DSN, $user,$pw)
> || die "cannnot connect: $DBI::errstr\n" unless $dbh;
> return;
> }
>
> Error message :-
> From ccs Wed Dec 27 14:00:01 2000
> Date: Wed, 27 Dec 2000 14:00:01 +0800
> From: ccs (calling card statistics)
> Message-Id: <200012270600.OAA29065_at_ccshost.>
> To: ccs
> Subject: Output from "cron" command
> Content-Length: 403
>
> Your "cron" job on ccshost
> /opt/ccs/bin/insertlog > /export/home/iLife/insertlog.log
>
> produced the following output:
>
> ORACLE_HOME environment variable not set!
> DBI->connect failed: Error while trying to retrieve text for error
ORA-12154
> (DBD ERROR: OCIServerAttach) at /opt/ccs/bin/insertlog line 96
> cannnot connect: Error while trying to retrieve text for error ORA-12154
> (DBD ERROR: OCIServerAttach)
>
> ?
>
> Could someone tell what going wrong, I have check environment varibles
under
> ksh is good.
> Any words would be appreciated.
>
> Stanley
>
>
Received on Wed Dec 27 2000 - 02:46:18 CST