On Tue, 9 Sep 2003 07:52:44 +1000  "Baras, Gal"
<[EMAIL PROTECTED]> wrote:

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

That is what I was thinking about, assuming $ORAmode gets set to the
equivalent of either ORA_SYSDBA or ORA_SYSOPER.

In Unix, the curent system account has to belong to the group that is
given the specific privilege at install time.  I'm not sure how this is
managed in MSWindows versions of Oracle.

If you are logging in remotely, check 'remote_login_passwordfile' in
init*.ora.  You might also try logging in to SQL*Plus from the same OS
account to see if you get the same error.

  sqlplus he76dm/??? as SYSDBA

You may also need the DBA to run 'grant sysdba to he76dm;'.

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

[EMAIL PROTECTED] oracle]$ oerr ORA 01031
01031, 00000, "insufficient privileges"
// *Cause: An attempt was made to change the current username or
//   password without the appropriate privilege. This error also occurs
//   if attempting to install a database without the necessary
//   operating system privileges.
//   When Trusted Oracle is configure in DBMS MAC, this error may occur
//   if the user was granted the necessary privilege at a higher label
//   than the current login.
// *Action: Ask the database administrator to perform the operation or
//   grant the required privileges.
//   For Trusted Oracle users getting this error although granted the
//   the appropriate privilege at a higher label, ask the database
//   administrator to regrant the privilege at the appropriate label.

-- 
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.

Reply via email to