Well, I think the following would be about right, according to what you're
pointing to:
-- script --
use strict;
use DBI;
use DBD::Oracle qw(:ora_session_modes);
my $dbh;
# ORAinit sets the $ORA variables. See below
&ORAinit(@ARGV) || pod2usage({-msg => $ORAerror, -exitval => 2, -verbose =>
2});
$dbh = DBI ->connect($ORAconnect, $ORAuser, $ORApass,
{RaiseError => 0, AutoCommit => 0,
ora_session_mode => $ORAmode}) || die $DBI::errstr;
-- end of script --
-- debugging output from ORAinit --
ORAuser: , ORApass: , ORAsid: HE76DM
ORAconnect: dbi:Oracle:HE76DM, ORAmode: 2
DBI connect('HE76DM','',...) failed: ORA-01031: insufficient privileges (DBD
ERROR: OCISessionBegin) at ./tq_messenger.pl line 52
-- end of output --
Please let me know if there's anything in the documentation that I'm missing
here.
Thanks,
Gal
-----Original Message-----
From: Michael A Chase [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 9 September 2003 1:57 AM
To: Baras, Gal; '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Re: ORA-01031 when trying to connect as sysdba. sqlplus works
On Mon, 8 Sep 2003 17:59:13 +1000 "Baras, Gal"
<[EMAIL PROTECTED]> wrote:
> I'm getting an ORA-01031 error when trying to use the ORA_SYSDBA or
> ORA_SYSOPER modes.
>
> When using sqlplus, I can use '/ as sysdba' and '/ as sysoper' as the
> same UNIX user(s).
http://search.cpan.org/dist/DBD-Oracle/Oracle.pm#Connect_Attributes
--
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.