Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DBI - solved

Re: DBI - solved

From: <genegurevich_at_discoverfinancial.com>
Date: Wed, 1 Nov 2006 15:41:20 -0600
Message-ID: <OFC2B12713.0295DCD1-ON86257219.00770F30-86257219.007722BE@discoverfinancial.com>


Jared,

Thank you. It turned out that everything worked as long as they used slash (/) for the name as they were supposed
to.

thank you

Gene Gurevich

                                                                           
             "Jared Still"                                                 
             <jkstill_at_gmail.co                                             
             m>                                                         To 
             Sent by:                  genegurevich_at_discoverfinancial.com  
             oracle-l-bounce_at_f                                          cc 
             reelists.org              oracle-l_at_freelists.org              
                                                                   Subject 
                                       Re: DBI ?                           
             11/01/2006 01:50                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             jkstill_at_gmail.com                                             
                                                                           
                                                                           




On 11/1/06, genegurevich_at_discoverfinancial.com < genegurevich_at_discoverfinancial.com > wrote:   A developer is trying to connect to a database via DBI connect using an   externally authenticated Oracle ID.
  They claim that DBI can not connect to such an ID. Does anyone know   whether
  this is true? I have not had
  any experience with DBI and can't tell whether this is correct or whether

  they simply don't know something.

I believe that DBI can connect anywhere sqlplus can connect.

eg.

created user 'ops$jkstill identified externally'.

From SQLPLUS:

11:47-ordevdb01:dv10:jkstill-13 > sqlplus /

SQL*Plus: Release 9.2.0.7.0 - Production on Wed Nov 1 11:47:34 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production With the Partitioning option
JServer Release 9.2.0.7.0 - Production

SQL> Again, but trying to go through sqlnet:

11:47-ordevdb01:dv10:jkstill-13 > sqlplus /@dv10

SQL*Plus: Release 9.2.0.7.0 - Production on Wed Nov 1 11:48:00 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied

Enter user-name:

This would likely work if OID were setup.

From perl, on the server, with ORACLE_SID set:

11:48-ordevdb01:dv10:jkstill-13 > perl c.pl

                X

[ /home/jkstill/tmp/dbi ]

Here is the script used:

use DBI;

my $username='/';
my $password = '';

my $dbh = DBI->connect(

   'dbi:Oracle:',
   $username, $password
);

die "Connect to $db failed \n" unless $dbh;

my $sql=q{select * from dual};
my $sth = $dbh->prepare($sql);
$sth->execute;

while( my $ary = $sth->fetchrow_arrayref ) {

   print "\t\t$ary->[0]\n";
}

$sth->finish;
$dbh->disconnect;

It the script can't connect, try the same connection from SQL*Plus.

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 01 2006 - 15:41:20 CST

Original text of this message

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