Thanks to all who replied.  I have found the solution at this site:

http://search.cpan.org/~pythian/DBD-Oracle-1.19/Oracle.pm#Connecting_wit
hout_environment_variables_or_tnsname.ora_file

excerpt:

To connect to a local database with a user which has been set-up to
authenticate via the OS ("ALTER USER username IDENTIFIED EXTERNALLY"):

  $dbh = DBI->connect('dbi:Oracle:','/','');

Note the lack of a connection name (use the ORACLE_SID environment
variable). If an explicit SID is used you'll probably get an ORA-01004
error.

Mark Cummings 


  _____  

From: Cummings, Mark 
Sent: Wednesday, December 20, 2006 2:38 PM
To: 'Jonathan Leffler'; DBI Users Mailing List
Subject: RE: Unix: Oracle User Identified Externally

 

perl -MDBI -e 'print "$DBI::VERSION\n";'

1.50

 

Thank you... now I can focus on release notes to current 1.53 version.
Hope we didn't lose the functionality of Oracle users identified
externally being able to login with a '/' convention.

Mark Cummings 

  _____  

From: Jonathan Leffler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 20, 2006 2:09 PM
To: Cummings, Mark; DBI Users Mailing List
Subject: Re: Unix: Oracle User Identified Externally

 

 

On 12/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:

Tried this, but still not working.   DO you know how to determine which 
version of DBI you are using?


Alternatively (to DBI->installed_versions):

perl -MDBI -e 'print "$DBI::VERSION\n";'

Your original connection notation - with the driver name as the fourth
argument - is really old.  It was deprecated a long time before the turn
of the millennium.

I don't know enough about Oracle connection notations to know how to
help with slash vs anything else for an externally identified user.  It
seems logical to me that you'd provide the external user name to the
connect string - but that's just what I'm used to on other DBMS.

 

         

        -----Original Message-----
        From: Reidy, Ron [mailto:[EMAIL PROTECTED]
        Sent: Wednesday, December 20, 2006 11:10 AM
        [...]
        
        Shouldn't the password be blank? 
        
        $dbh = $DBI->connect("dbi:Oracle:", "/", "", ...);
        
        This is what I use for SYS connections, analogous to using the
SQL*Plus
        command 'connect / as sysdba'.
        
        
        -----Original Message-----
        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
        Sent: Wednesday, December 20, 2006 10:58 AM 
        To: [email protected]
        Subject: Unix: Oracle User Identified Externally
        
        I am migrating an Oracle 9i to Oracle 10g database, and Perl
5.0.4 to
        Perl 5.8.7 in Sun Solaris environment. 
        
        My old Perl/DBI script was able to connect via this method:
        use DBI;
        $dbd = 'Oracle';
        $user = '/'; $password = '/';
        $dbh = DBI->connect ($dbname, $user, $password, $dbd);
        
        This is not working with new version of Perl/DBI.
        
        I have changed script to connect correctly:
        use DBI;
        $dbd = 'Oracle';
        $user = 'scott'; $password = 'tiger';
        $dbh = DBI->connect ("dbi:$dbd:$dbname",$user, $password); 
        
        But need to be able to connect with user identified externally
(as
        before).
        
        I cannot find documentation on proper syntax or if a fix was
made in
        later version of DBI.
        
        Can anyone help?




-- 
Jonathan Leffler <[EMAIL PROTECTED]>  #include <disclaimer.h>
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it." 

Reply via email to