On Fri, 20 Sep 2002 17:44:52 -0400 Rachel <[EMAIL PROTECTED]> wrote:

> I am trying to execute a perl script on 2 different unix servers.  On
> both servers, the perl is called from a bourne shell script.  Any
> changes required to reflect the different environments are made in the
> shell script in order to help keep the perl pure from taint.  Basically,
> the perl script is EXACTLY THE SAME on both servers.  The perl makes a
> connection to a database (the same database, regardless of where the
> perl is running).  One server is running Solaris 5.6, the other is
> running Solaris 5.8.  the database resides on a completely different
> server from the ones running the perl script and is oracle 8i.
>  
> When I run the script on the 5.6 box, I have absolutely no problems.
> However, when I run the script on the 5.8 box, I get the following
> error:
> DBI->connect(host=gobi;sid=eandd) failed: ERROR OCIEnvInit at
> epay_rejects.pl line 393
> Database connection not made:  ERROR OCIEnvInit
>  
> I've seen posts similar to this, but none seem to answer the question of
> how to resolve it.  Some suggestions were to make sure that a connection
> could be made to the database through some other tool.  I can connect
> through other tools.and in fact connect with the exact same code, just
> on a different unix box.  One thought occurred to me that the DBD
> package may possibly need to be re-installed.
>  
> Does anyone have any ideas for a possible solution?

>From the error, it appears that all the necessary modules are installed. 
If the underlying OS or perl has changed, a rebuild of DBI and DBD::Oracle
would be a good idea.

Have you connected to the database with the exact same userid, password,
and environment using SQL*Plus on the same box as you are getting the
failure?  Cutting and pasting all the environment variables being set in
the shell script into the session you are trying the connect in would help
avoid typo problems both in your command line session and in the script.

If nothing turns up there, use trace().  You can do that without modifying
the script by setting the DBI_TRACE environment variable, see DEBUGGING in
'perldoc DBI' for details.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to