perl connection "/ as sysdba" doesn't work for me on solaris



I'm trying to connect "/ as sysdba" (without using a username or password) as the documentation says
http://search.cpan.org/dist/DBD-Oracle/Oracle.pm

I can connect as follows:

sqlplus '/ as sysdba'

but not using the following perl example from the same oracle account

$dsn = "dbi:Oracle:"; # no dbname here
$ENV{ORACLE_SID} = "orcl"; # set ORACLE_SID as needed
delete $ENV{TWO_TASK}; # make sure TWO_TASK isn't set
$dbh = DBI->connect($dsn, "", "", { ora_session_mode => ORA_SYSDBA });


The above perl results in the following error message:

DBI->connect failed: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin)

The DBA_AUDIT_TRAIL lists the failed logon username as OPS$ORACLE.

I'm trying this on Solaris 8 on a 8.1.7.4 database with the following version of perl -v

This is perl, v5.6.0 built for sun4-solaris

Whenever I use a username and password with my perl scripts I don't have a problem
; however, I would like to be able to connect without usernames and password in the same way as I can connect from sqlplus.
.



Relevant Pages

  • Re: Displaying a users group memberships
    ... The user's username is passed to the script via the command line and captured with ARGV. ... I want to determine the group memberships (much like executing `groups` from the command line) and run those through a loop for processing. ... I'm very new to Perl so maybe I'm just looking for the wrong terms or something. ... The format of the command is simple: `test.pl username`, where username is a real username on the system in question. ...
    (perl.beginners)
  • script help to update member profiles
    ... form is all stored in a MySql Database (First Name, Last Name, Username, ... my partner that did all the perl scripts was injured ... Compare entered username and password to database to confirm the user is ...
    (comp.lang.perl.misc)
  • Re: variable with empty space
    ... being passed to my perl script. ... I am having a difficult time making the script stop ... if ($username eq ' ') ... die(" "); ...
    (comp.lang.perl.misc)
  • Re: perl connection "/ as sysdba" doesnt work for me on solaris
    ... but not using the following perl example from the same oracle account ... The above perl results in the following error message: ... The DBA_AUDIT_TRAIL lists the failed logon username as OPS$ORACLE. ... I would like to be able to connect without usernames and password in the same way as I can connect from sqlplus. ...
    (comp.databases.oracle.server)
  • problem deleting record in a text file
    ... I'm new to perl. ... You will find below the script I wrote. ... Actually the temporary file is created the way it should be but I didn't ... # extract the username from the record ...
    (perl.beginners)