Unix: Oracle User Identified Externally

Unix: Oracle User Identified Externally

am 20.12.2006 18:58:00 von Mark.Cummings

------_=_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--

RE: Unix: Oracle User Identified Externally

am 20.12.2006 19:10:23 von Ron.Reidy

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@wellsfargo.com [mailto:Mark.Cummings@wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users@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=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
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.

RE: Unix: Oracle User Identified Externally

am 20.12.2006 21:32:09 von Mark.Cummings

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@arraybiopharma.com]=20
Sent: Wednesday, December 20, 2006 11:10 AM
To: Cummings, Mark; dbi-users@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@wellsfargo.com [mailto:Mark.Cummings@wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users@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=20
to be for the use of the individual or entity named above. If you are
not the=20
intended recipient, please be aware that any disclosure, copying,
distribution=20
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.

RE: Unix: Oracle User Identified Externally

am 20.12.2006 21:57:37 von tshinnic

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

At 02:32 PM 12/20/2006, Mark.Cummings@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 @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@arraybiopharma.com]
>Sent: Wednesday, December 20, 2006 11:10 AM
>To: Cummings, Mark; dbi-users@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@wellsfargo.com [mailto:Mark.Cummings@wellsfargo.com]
>
>Sent: Wednesday, December 20, 2006 10:58 AM
>To: dbi-users@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--

Re: Unix: Oracle User Identified Externally

am 20.12.2006 22:09:22 von jonathan.leffler

------=_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@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@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@wellsfargo.com [mailto:Mark.Cummings@wellsfargo.com]
> Sent: Wednesday, December 20, 2006 10:58 AM
> To: dbi-users@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 #include
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--

RE: Unix: Oracle User Identified Externally

am 20.12.2006 22:38:00 von Mark.Cummings

------_=_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

=20

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=20



_____ =20

From: Jonathan Leffler [mailto:jonathan.leffler@gmail.com]=20
Sent: Wednesday, December 20, 2006 2:09 PM
To: Cummings, Mark; DBI Users Mailing List
Subject: Re: Unix: Oracle User Identified Externally

=20

=20

On 12/20/06, Mark.Cummings@wellsfargo.com > wrote:

Tried this, but still not working. DO you know how to determine which=20
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.

=20

=20

-----Original Message-----
From: Reidy, Ron [mailto:Ron.Reidy@arraybiopharma.com]
Sent: Wednesday, December 20, 2006 11:10 AM
[...]
=09
Shouldn't the password be blank?=20
=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@wellsfargo.com
[mailto:Mark.Cummings@wellsfargo.com]
Sent: Wednesday, December 20, 2006 10:58 AM=20
To: dbi-users@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.=20
=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);=20
=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?




--=20
Jonathan Leffler #include
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."=20


------_=_NextPart_001_01C7247F.1EE87728--

RE: Unix: Oracle User Identified Externally

am 20.12.2006 23:43:00 von Mark.Cummings

------_=_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=20


_____ =20

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

=20

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

1.50

=20

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=20

_____ =20

From: Jonathan Leffler [mailto:jonathan.leffler@gmail.com]=20
Sent: Wednesday, December 20, 2006 2:09 PM
To: Cummings, Mark; DBI Users Mailing List
Subject: Re: Unix: Oracle User Identified Externally

=20

=20

On 12/20/06, Mark.Cummings@wellsfargo.com > wrote:

Tried this, but still not working. DO you know how to determine which=20
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.

=20

=20

-----Original Message-----
From: Reidy, Ron [mailto:Ron.Reidy@arraybiopharma.com]
Sent: Wednesday, December 20, 2006 11:10 AM
[...]
=09
Shouldn't the password be blank?=20
=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@wellsfargo.com
[mailto:Mark.Cummings@wellsfargo.com]
Sent: Wednesday, December 20, 2006 10:58 AM=20
To: dbi-users@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.=20
=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);=20
=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?




--=20
Jonathan Leffler #include
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."=20


------_=_NextPart_001_01C72488.33B5FE70--

Re: Unix: Oracle User Identified Externally

am 20.12.2006 23:54:36 von jkstill

------=_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 wrote:
>
> On 12/20/06, Mark.Cummings@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--

Re: Unix: Oracle User Identified Externally

am 21.12.2006 15:14:48 von cj10

On 20/12/06 17:58, Mark.Cummings@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@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679

RE: Unix: Oracle User Identified Externally

am 22.12.2006 16:22:07 von Ron.Reidy

Sorry - snow bound for 2 days.

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

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

Sent: Wednesday, December 20, 2006 1:32 PM
To: Reidy, Ron; dbi-users@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@arraybiopharma.com]=20
Sent: Wednesday, December 20, 2006 11:10 AM
To: Cummings, Mark; dbi-users@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@wellsfargo.com [mailto:Mark.Cummings@wellsfargo.com]

Sent: Wednesday, December 20, 2006 10:58 AM
To: dbi-users@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=20
to be for the use of the individual or entity named above. If you are
not the=20
intended recipient, please be aware that any disclosure, copying,
distribution=20
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.