RE: DBI & DBD::Oracle

From: Ron Reidy (Ron.Reidy_at_arraybiopharma.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 14:09:20 -0600
To: "Moon, John" <john.moon@myflorida.com>, <dbi-users@perl.org>

John,

My guess is you do not have the correct Oracle environment set up. See the below metalink notes:

1012295.102 - HOW TO SUPPORT TWO-TASK COMMON ERRORS
1020408.102 - ORA-03106 WHEN CONNECTING TO UTF8 DATABASE

Also, I would print the Oracle error message when you encounter errors: $DBI::errstr

-----------------
Ron Reidy
Senior DBA
Array BioPharma, Inc.

-----Original Message-----
From: Moon, John [mailto:john.moon@myflorida.com]
Sent: Tuesday, June 29, 2004 1:14 PM
To: 'dbi-users@perl.org'
Subject: DBI & DBD::Oracle

I originally sent this to the CGI list so please excuse me if you are on
both.

This is perl, version 5.004_01
# $Id: DBI.pm,v 11.3 2001/08/24 23:33:40 timbo Exp $
$DBI::VERSION = "1.20";
# $Id: Oracle.pm,v 1.92 2001/08/31 16:23:59 timbo Exp $
$DBD::Oracle::VERSION = '1.12';

I have "many" databases on "many" different platforms (Sun boxes). One of
the boxes has a tnsnames files that contains all of the various instances. I
connect from this box to all of the instances except three...

I have tried various ways to connect but can not connect to three from my
Perl script - I can connect with SqlPlus from the command line to the three
databases.

I get this error message when trying to connect:
DBI->connect() failed: ORA-03106: fatal two-task communication protocol
error (DBD: login failed) at /.../ThisConnect.pm line 8

Below is the connection sub. Any help or suggestions will be greatly
appreciated.

Thanks in advance...

sub MyConnect{
     use strict;
     my($instance) = @_; # alias name
     my $driver = 'dbi:Oracle:';
     my $user = 'xxx';
     my $passwd = 'xxx';
 # DBI->trace(5) if $instance =~ /efis/i;
     my $dbh = DBI->connect($driver, "$user\@$instance", $passwd);
 # or die "Could not connect to instance <$instance>: " .
DBI->errstr;
     return $dbh;
 }
1;

I've included the threads I have to the original post to show what I've
tried...

------

OK... I "WAS" thinking it was a "TWO_TASK" error but now see the
difference... But I don't understand why I can connect & select from SqlPlus
but not even Connect with DBI? The referenced doc seems to imply that I
should NOT be able to connect at all(?). My Sqlplus connect looks like:
>sqlplus database@alias
which is the same(?) connection I'm using with DBI(?).

Thanks again for the information and the help...

jwm

-----Original Message-----
From: Gene Dascher [mailto:gedascher@multiservice.com]
Sent: Tuesday, June 29, 2004 12:48 PM
To: Moon, John
Subject: RE: [CGI] DBI & DBD::Oracle

Try looking at this page to see if it can give you any direction:

http://www.fors.com/velpuri2/ERRORS/TWO-TASK%20COMMON%20ERRORS

Gene

> -----Original Message-----
> From: Moon, John [mailto:john.moon@myflorida.com]
> Sent: Tuesday, June 29, 2004 11:37
> To: 'Gene Dascher'
> Subject: RE: [CGI] DBI & DBD::Oracle
>
>
> Same error with the below and "alias name"...
>
> Thanks,
>
> jwm
>
> -----Original Message-----
> From: Gene Dascher [mailto:gedascher@multiservice.com]
> Sent: Tuesday, June 29, 2004 12:25 PM
> To: Moon, John
> Subject: RE: [CGI] DBI & DBD::Oracle
>
> Try connecting like this:
>
> DBI->connect($driver . $instance, $username, $password);
>
> Gene
>
> > -----Original Message-----
> > From: owner-cgi-list@jann.com [mailto:owner-cgi-list@jann.com]On Behalf
> > Of Moon, John
> > Sent: Tuesday, June 29, 2004 11:11
> > To: cgi-list@jann.com
> > Subject: [CGI] DBI & DBD::Oracle
> >
> >

This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is intended
to be for the use of the individual or entity named above. If you are not the
intended recipient, please be aware that any disclosure, copying, distribution
or use of the contents of this information is prohibited. Please notify the
sender of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.



Relevant Pages

  • DBI & DBD::Oracle
    ... Perl script - I can connect with SqlPlus from the command line to the three ... But I don't understand why I can connect & select from SqlPlus ... which is the sameconnection I'm using with DBI. ... > To: Moon, John ...
    (perl.dbi.users)
  • Re: Using the DBI to connect to an Oracle server w/o connecting to a database
    ... The point of DBI is that it provides a perl ... x> want to feed a text file through sqlplus with no interaction, ... that with SQL statements passed to DBI, you need to do a new connect. ...
    (comp.lang.perl.misc)
  • Re: Oracles RPAD problematic via Perls DBI module
    ... > use DBI; ... > This problem occurs only for a blank string. ... > If I run the query via sqlplus: ...
    (comp.lang.perl.misc)
  • Re: NOWAIT exit from sqlplus when ORA-12545
    ... The solution given by someone is to use sqlplus with -L option. ... So it does only one connection. ... if %errorlevel% NEQ 0 echo KO: ...
    (comp.databases.oracle.server)
  • Problem with Oracle 10.2 and Perl dbd/dbi interface
    ... There is a problem in Oracle 10.2 that surfaces after you install the latest ... dbd-oracle and dbi on a windows box. ... Renaming this file will get sqlplus and ... The symptom of this is an error message when the license ...
    (perl.dbi.users)