Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: connecting automatically as sys

Re: connecting automatically as sys

From: Hans Forbrich <>
Date: Tue, 20 Jul 2004 00:17:59 GMT
Message-ID: <XwZKc.78496$Rf.4327@edtnps84>

jonathan wrote:

> Hans Forbrich <> wrote in message
> news:<cMJJc.46901$Rf.29802_at_edtnps84>...

>> jonathan wrote:
>> > 
>> > I have a bizarre one - I want to automate a script that uses the 'sys'
>> > user, but when I try to log in via sqlplus:
>> > 
>> <grumble>
>> I percieve that you are using downloaded Oracle9i Release 2, on
>> Linux Fedora Core 1. (This based on the fact that you did not tell us the
>> version of the database, but you are talking about the process table.
>> Therefore I conclude you are a recent refugee from Windows-land and THEY
>> never talk about versions <g>).

> no.. this is actually a cross-version question. and 8.1.7 and
> come to think of it 7.3.4. OSes are solaris 2.6, 2.8, and windows xp
> tablet edition.
> Why confuse the issue with extraneous information that isn't relevent
> to the problem at hand?

Partly because it might be relevant.

Things have changed. The original svrmgrl is no longer available in ORacle9i. SQLPlus now handles svrmgrl's functionality. As a result, the SQLPlus API has changed subtly.

>> Logging in as SYS would generally be considered a bad thing, but I
>> suppose
>> you have a valid reason.  Would you mind sharing that reason with us?
>> (There are very few things that can not be accomplished with a regular
>> DBA.)

> Yes, i have a valid reason - I need to recreate a function in another
> database which - for security reasons - is made as sysdba rather than
> dba.
> Since I need to recreate it in another database, I need to
> automatically supply the sysdba password. I suppose I could do it via
> Expect, but that's a bit of a kludge, isn't it.

Apparently it can't be done as a regular DBA with appropriate ROLE and PRIVILEDGE considerations, can't be done using DBMS_JOBS, probably can't be done using some form of UTL_FILE or EXTPROC or External tables or Contexts or FGAC. And you need this specific mechanism .... hmmmm

Seems too obscure for me to understand.

Guess I can't help - sorry.

/Hans Received on Mon Jul 19 2004 - 19:17:59 CDT

Original text of this message