Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: perl connection "/ as sysdba" doesn't work for me on solaris

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

From: Tasm <tasm_at_tasm.com>
Date: Thu, 31 Aug 2006 16:13:24 +1000
Message-ID: <ed5um4$1l35$1@bunyip2.cc.uq.edu.au>


DA Morgan wrote:

> Tasm wrote:

>> 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.
> 
> What is the business case for using perl to log in as SYS? This seems
> like a violation of common-sense security procedures. What is it you are 
> doing?
> 
> Oracle is making the assumption that you are trying to log in using an
> externally authenticated account. Since the Solaris user is oracle it is 
> prepending the OPS$.

I'm running a perl script from the oracle account so that I can dump a large number of tables to flat files. Unfortunately this is required by another group and they must be in flat file format to their specification. Unfortunately there doesn't seem to be any other way to dump oracle tables quickly to flat files. Received on Thu Aug 31 2006 - 01:13:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US