John,

At the minimum, the Oracle client needs to know where ORACLE_HOME is.  All
of our scripts set $ENV{ORACLE_HOME} to the correct value prior to
attempting to establish a new database connection.

That being said, I'm not convinced the problem is with an environment
variable.  To me, this looks more like a problem with your net services
configuration.  Your client seems to be correctly locating a listener, but
the service name you are passing does not match with any of the services
known to that listener.  Check that the sqlnet.ora and tnsnames.ora files
are consistent on both client machines and that you are using the same
version of the client.  The way service names are specified changed between
version 8.0.5 and 8.1, which caused similar problems for us until we got the
clients reconfigured.

Hope that helps...

-dpf-

-----------------------
David P. Fannin
Database Administrator                                  [EMAIL PROTECTED]
UM-Rolla Computing and Information Services      FAX (573) 341-4216
URL  http://www.umr.edu/~dpf                   PHONE (573) 341-4841
-----------------------


-----Original Message-----
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 31, 2001 8:48 AM
To: Tim Bunce; Dbi-Users (E-mail)
Subject: RE: ReL DBD-ERROR: OCIServerAttach -> ORA-12514


Environment Variables?  which ones?

> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 31, 2001 9:13 AM
> To: John Menke
> Cc: Dbi-Users (E-mail)
> Subject: Re: ReL DBD-ERROR: OCIServerAttach -> ORA-12514
> 
> 
> Perhaps environment variables.
> 
> Tim.
> 
> On Mon, Dec 31, 2001 at 07:53:55AM -0500, John Menke wrote:
> > Dan,  I have attached the code.  What is strange is that I 
> > CAN execute the script without errors using a program called 
> > PsExec.  This program is designed to run programs on remote 
> > computers.  If I trigger running the script with the PsExec 
> > it works fine.  When I run from the command line on the local 
> > computer it gives the RE: DBD-ERROR: OCIServerAttach -> ORA-12514.
> >  
> > Not sure what the difference is.  
> > 
> > Here is the code:
> > 
> > %attr = (
> > 
> > PrintError => 1,
> > RaiseError => 1
> > );
> > 
> > 
> > eval {
> >  $dbh = DBI->connect ("dbi:Oracle:$datasourcename", "user", 
> "password", \%attr);
> > };
> > 
> > 
> > > 
> > > 
> > > 
> > > 
> > > > Hi John
> > > > 
> > > > Can you provide a code snippet?
> > > > 
> > > > Dan
> > > > 
> > > 
> 

Reply via email to