Unix: Oracle User Identified Externally

------_=_NextPart_001_01C72460.6361C608
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 =3D 'Oracle';
$user =3D '/'; $password =3D '/';
$dbh =3D 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 =3D 'Oracle';
$user =3D 'scott'; $password =3D 'tiger';
$dbh =3D 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?

Mark Cummings


------_=_NextPart_001_01C72460.6361C608--
Mark.Cummings [ Mi, 20 Dezember 2006 18:58 ] [ ID #1574078 ]

RE: Unix: Oracle User Identified Externally

Mark,

Shouldn't the password be blank?

$dbh =3D $DBI->connect("dbi:Oracle:", "/", "", ...);

This is what I use for SYS connections, analogous to using the SQL*Plus
command 'connect / as sysdba'.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users [at] perl.org
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 =3D 'Oracle';
$user =3D '/'; $password =3D '/';
$dbh =3D 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 =3D 'Oracle';
$user =3D 'scott'; $password =3D 'tiger';
$dbh =3D 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?

Mark Cummings


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.
Ron.Reidy [ Mi, 20 Dezember 2006 19:10 ] [ ID #1574079 ]

RE: Unix: Oracle User Identified Externally

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

Mark Cummings

-----Original Message-----
From: Reidy, Ron [mailto:Ron.Reidy [at] arraybiopharma.com]
Sent: Wednesday, December 20, 2006 11:10 AM
To: Cummings, Mark; dbi-users [at] perl.org
Subject: RE: Unix: Oracle User Identified Externally

Mark,

Shouldn't the password be blank?

$dbh =3D $DBI->connect("dbi:Oracle:", "/", "", ...);

This is what I use for SYS connections, analogous to using the SQL*Plus
command 'connect / as sysdba'.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users [at] perl.org
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 =3D 'Oracle';
$user =3D '/'; $password =3D '/';
$dbh =3D 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 =3D 'Oracle';
$user =3D 'scott'; $password =3D 'tiger';
$dbh =3D 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?

Mark Cummings


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.
Mark.Cummings [ Mi, 20 Dezember 2006 21:32 ] [ ID #1574080 ]

RE: Unix: Oracle User Identified Externally

--=====================_401103625==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 02:32 PM 12/20/2006, Mark.Cummings [at] wellsfargo.com wrote:
>Tried this, but still not working. DO you know how to determine which
>version of DBI you are using?

Using
perl -MDBI -e "print DBI->installed_versions;"
gives me
Perl : 5.008008 (MSWin32-x86-multi-thread)
OS : MSWin32 (5.0)
DBI : 1.52
DBD::mysql : 3.0008
DBD::Sponge : 11.10
DBD::SQLite2 : 0.33
DBD::SQLite : 1.13
DBD::Proxy : install_driver(Proxy) failed: Can't locate
RPC/PlClient.pm in [at] INC
DBD::File : 0.35
DBD::ExampleP : 11.12
DBD::DBM : 0.03
DBD::CSV : 0.22
DBD::AnyData : 0.08

I believe this is the easiest way to answer that question (assuming
you have at least DBI 1.38)


>Mark Cummings
>
>-----Original Message-----
>From: Reidy, Ron [mailto:Ron.Reidy [at] arraybiopharma.com]
>Sent: Wednesday, December 20, 2006 11:10 AM
>To: Cummings, Mark; dbi-users [at] perl.org
>Subject: RE: Unix: Oracle User Identified Externally
>
>Mark,
>
>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'.
>
>--
>Ron Reidy
>Lead DBA
>Array BioPharma, Inc.
>
>-----Original Message-----
>From: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]
>
>Sent: Wednesday, December 20, 2006 10:58 AM
>To: dbi-users [at] perl.org
>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?
>
>Mark Cummings
>
>
>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.

--=====================_401103625==.ALT--
tshinnic [ Mi, 20 Dezember 2006 21:57 ] [ ID #1574081 ]

Re: Unix: Oracle User Identified Externally

------=_Part_25128_23335630.1166648962453
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 12/20/06, Mark.Cummings [at] wellsfargo.com <Mark.Cummings [at] wellsfargo.com>
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:Ron.Reidy [at] arraybiopharma.com]
> 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: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]
> Sent: Wednesday, December 20, 2006 10:58 AM
> To: dbi-users [at] perl.org
> 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 <jonathan.leffler [at] gmail.com> #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."

------=_Part_25128_23335630.1166648962453--
jonathan.leffler [ Mi, 20 Dezember 2006 22:09 ] [ ID #1574082 ]

RE: Unix: Oracle User Identified Externally

------_=_NextPart_001_01C7247F.1EE87728
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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




--
Jonathan Leffler <jonathan.leffler [at] gmail.com> #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."


------_=_NextPart_001_01C7247F.1EE87728--
Mark.Cummings [ Mi, 20 Dezember 2006 22:38 ] [ ID #1574083 ]

RE: Unix: Oracle User Identified Externally

------_=_NextPart_001_01C72488.33B5FE70
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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

http://search.cpan.org/~pythian/DBD-Oracle-1.19/Oracle.pm#Co nnecting_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 =3D 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:jonathan.leffler [at] gmail.com]
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, Mark.Cummings [at] wellsfargo.com <Mark.Cummings [at] wellsfargo.com
> 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:Ron.Reidy [at] arraybiopharma.com]
Sent: Wednesday, December 20, 2006 11:10 AM
[...]
=09
Shouldn't the password be blank?
=09
$dbh =3D $DBI->connect("dbi:Oracle:", "/", "", ...);
=09
This is what I use for SYS connections, analogous to using the
SQL*Plus
command 'connect / as sysdba'.
=09
=09
-----Original Message-----
From: Mark.Cummings [at] wellsfargo.com
[mailto:Mark.Cummings [at] wellsfargo.com]
Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users [at] perl.org
Subject: Unix: Oracle User Identified Externally
=09
I am migrating an Oracle 9i to Oracle 10g database, and Perl
5.0.4 to
Perl 5.8.7 in Sun Solaris environment.
=09
My old Perl/DBI script was able to connect via this method:
use DBI;
$dbd =3D 'Oracle';
$user =3D '/'; $password =3D '/';
$dbh =3D DBI->connect ($dbname, $user, $password, $dbd);
=09
This is not working with new version of Perl/DBI.
=09
I have changed script to connect correctly:
use DBI;
$dbd =3D 'Oracle';
$user =3D 'scott'; $password =3D 'tiger';
$dbh =3D DBI->connect ("dbi:$dbd:$dbname",$user, $password);
=09
But need to be able to connect with user identified externally
(as
before).
=09
I cannot find documentation on proper syntax or if a fix was
made in
later version of DBI.
=09
Can anyone help?




--
Jonathan Leffler <jonathan.leffler [at] gmail.com> #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."


------_=_NextPart_001_01C72488.33B5FE70--
Mark.Cummings [ Mi, 20 Dezember 2006 23:43 ] [ ID #1574084 ]

Re: Unix: Oracle User Identified Externally

------=_Part_2957_18819039.1166655276394
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 12/20/06, Jonathan Leffler <jonathan.leffler [at] gmail.com> wrote:
>
> On 12/20/06, Mark.Cummings [at] wellsfargo.com <Mark.Cummings [at] wellsfargo.com>
> 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";'
>
>
or even:

$> perl -MDBI=999999
DBI version 999999 required--this is only version 1.52 at
/u01/app/perl/lib/5.8.8/Exporter/Heavy.pm line 121.
BEGIN failed--compilation aborted.


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

------=_Part_2957_18819039.1166655276394--
jkstill [ Mi, 20 Dezember 2006 23:54 ] [ ID #1574085 ]

Re: Unix: Oracle User Identified Externally

On 20/12/06 17:58, Mark.Cummings [at] wellsfargo.com wrote:
> 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.

You need to leave both the user and password blank. Also,
the connection must be local (i.e. via the bequeather q.v.),
you need to set the environment variable ORACLE_SID and
not to set TWO_TASK. ORACLE_HOME should, of course, also be
set.

The following is copied from known working code. (ORACLE_HOME
is already set before this is called.)

sub our_connect {
my $sid = shift;
local $ENV{ORACLE_SID} = $sid;
DBI->connect("dbi:Oracle:", "", "",
{AutoCommit=>0, RaiseError=>1, PrintError=>0, ShowErrorStatement=>1});
};



--
Charles Jardine - Computing Service, University of Cambridge
cj10 [at] cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679
cj10 [ Do, 21 Dezember 2006 15:14 ] [ ID #1575228 ]

RE: Unix: Oracle User Identified Externally

Sorry - snow bound for 2 days.

To determine DBI version:
$ perl -CDBI -e 'print $DBI::Version"

-----Original Message-----
From: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]

Sent: Wednesday, December 20, 2006 1:32 PM
To: Reidy, Ron; dbi-users [at] perl.org
Subject: RE: Unix: Oracle User Identified Externally

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

Mark Cummings

-----Original Message-----
From: Reidy, Ron [mailto:Ron.Reidy [at] arraybiopharma.com]
Sent: Wednesday, December 20, 2006 11:10 AM
To: Cummings, Mark; dbi-users [at] perl.org
Subject: RE: Unix: Oracle User Identified Externally

Mark,

Shouldn't the password be blank?

$dbh =3D $DBI->connect("dbi:Oracle:", "/", "", ...);

This is what I use for SYS connections, analogous to using the SQL*Plus
command 'connect / as sysdba'.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Mark.Cummings [at] wellsfargo.com [mailto:Mark.Cummings [at] wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users [at] perl.org
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 =3D 'Oracle';
$user =3D '/'; $password =3D '/';
$dbh =3D 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 =3D 'Oracle';
$user =3D 'scott'; $password =3D 'tiger';
$dbh =3D 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?

Mark Cummings


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.
Ron.Reidy [ Fr, 22 Dezember 2006 16:22 ] [ ID #1576001 ]
Perl » perl.dbi.users » Unix: Oracle User Identified Externally

Vorheriges Thema: regarding installing dbd-oracle
Nächstes Thema: utf8 encoding problem