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: Help, what's going wrong?

Re: Help, what's going wrong?

From: Stefan Jahnke <q5665841_at_bonsai.fernuni-hagen.de>
Date: Wed, 27 Dec 2000 17:27:25 +0100
Message-ID: <3A4A186D.5C98672D@bonsai.fernuni-hagen.de>

Hi,

we also use both Perl and awk/ksh scripts. Hence, it makes sense to move all the environment stuff out of your .profile file into an additional file that is invoked by the scripts you run, if you can't be sure who runs the scripts and wether the env is set correctly in the invoking shell.
If you call a script from cron, you can forget about your "normal" env.

ciao
Stefan

Stanley wrote:
>
> 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 - 10:27:25 CST

Original text of this message

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