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: another connect internal question

Re: another connect internal question

From: Howard J. Rogers <howardjr_at_www.com>
Date: Sun, 11 Mar 2001 13:14:49 +1100
Message-ID: <3aaadf63@news.iprimus.com.au>

"RRtsai" <rrtsai_at_aol.com> wrote in message news:20010310205400.06799.00000690_at_ng-fj1.aol.com...
> Hi,
>
> I'm an Oracle newbie.
>
> When I connect internal (on NT), it asks me password which is "oracle".
 But if
> I connect sys/change_on_install as sysdba, it asks password again. What is
> that? I checked my sys privilege which has sysdba already.
>

"Change_on_install" is SYS's password when he connects as an ordinary, though powerful, User. It's his entry, in other words, in the data dictionary.

"Oracle" is SYS's password when he connects as a Privileged User (ie, one who is able to perform the Privileged Actions of create database, shutdown, startup, backup and recover). It's stored in the Password File.

The fact that SYS has two different passwords always seems to cause much confusion and consternation. But think of it is this way: do you expect your User's to use their Autobank PIN Number as their NT domain password? Yet it's the same person logging on in both cases, just with the intention of doing two completely different things.

How does Oracle know which version of SYS you want to connect as?? Because the magic words 'as sysdba' tell it that you wish to connect as a Privileged User, and accordingly it will go and check the password file.

Therefore, you can either do a 'connect sys/oracle as sysdba', or you can do a 'sys/change_on_install'. But a 'sys/change_on_install as sysdba' will utterly confuse Oracle, since you are claiming you want to use the Password File authentication method, but supplying the Data Dictionary password.

Just to confuse the situation completely, if you allow OS authentication to take place, then you will actually get away with 'connect totalrubbish/completehogwash as sysdba'. That will work perfectly well, where as 'connect totalrubbish/completehogwash' will fail miserably. Why? Because the 'as sysdba' in the first example tells Oracle you want to be authenticated as a Privileged User -so (given you've switched on O/S authentication) it will go off and check an O/S group for membership details, and if you, the O/S User, are a member of that group, you're in. But in the second example, the lack of the 'as sysdba' keywords will make Oracle think you want to connect as an ordinary User, and it will therefore check the Data Dictionary -and I'm presuming that you've never created the user 'totalrubbish'!

> Why they are no different as Oracle DBA Exam samples?
>

Don't understand the question, sorry.

Regards
HJR
> Thanks
Received on Sat Mar 10 2001 - 20:14:49 CST

Original text of this message

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