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: Oracle -perl connectivity error

Re: Oracle -perl connectivity error

From: Rick Wessman <Rick.Wessman_at_oracle.com>
Date: 12 Dec 2001 11:52:13 -0500
Message-ID: <socitbc754y.fsf@rwessman-pc.us.oracle.com>


Off the top of the my head, I don't see why one way would perform differently from the other.

However, you can stop the error from happening by adding the following to C:\ORACLE\NETWORK\ADMIN\sqlnet.ora (assuming that the TNS_ADMIN environment variable is not set):
sqlnet.authentication_services=(none)

What is probably happening is that the Oracle server is trying to authenticate you using Windows authentication, rather than using your username and password.

                                           Rick

Ban Spam <ban-spam_at_operamail.com> writes:

> priyan_at_karna.net (Priya) wrote in
> news:aef23f1d.0112111843.2bb339af_at_posting.google.com:
>
> > Hi,
> >
> > Environment are as follows
> >
> > I am using
> >
> > 1)Installed activeperl in windows 2000.
> > 2)Oracle database in the solaris server 192.168.128.58
> > 3)Installed Net8 in my system (windows 2000) & configured to oracle
> > server as service name "hpdb"
> >
> > I set the environment variable TWO_TASK as (T:192.168.128.58:hpdb) in
> > windows 2000.
> >
> > I am able to connect using sqlplus system/manager_at_hpdb
> ><mailto:system/manager_at_hpdb>
> >
> > Here is my code for connecting to oracle.
> >
> > #!perl
> >
> > use CGI;
> > use DBI;
> > use DBD::Oracle;
> > BEGIN {
> > $ENV{ORACLE_HOME} = 'C:/ORACLE/ORA81';
> > $ENV{TWO_TASK} = 'T:192.168.128.58:hpdb';
> > }
> >
> > print "content-type: text/html\n\n";
> >
> > my $dbh=DBI->connect("dbi:Oracle:hpdb", "system", "manager");
> > unless (defined $dbh) {
> > print "Cannot connect to server: $DBI::errstr\n";
> > die;
> > }
> >
> > I am getting "Cannot connect to server: ORA-12640: Authentication
> > adapter initialization failed (DBD: login failed) "
> >
> > What is the possible solution to resolve this issue? Where is the exact
> > problem lies?
> >
> > Thanks in advance.
> >
> > With regards,
> > Priya
> >
>
>
> Below is from working Perl code that I use.
>
>
> use DBI;
>
> ($database, $user, $password) = ('db1', 'abc', 'news');
> $dbh = DBI->connect("dbi:Oracle:$database",$user,$password, {RaiseError =>
> 1, AutoCommit => 0}) || die $DBI::errstr;
>
>
>
> HTH & YMMV
> HAND!
>
>

-- 
                                Rick Wessman
                                Security Assurance Group
                                Oracle Corporation
                                Rick.Wessman_at_oracle.com

     The opinions expressed above are mine and do not necessarily reflect
                         those of Oracle Corporation.
Received on Wed Dec 12 2001 - 10:52:13 CST

Original text of this message

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