René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Connecting AS SYSDBA/SYSOPER [Oracle] | ||
A user must connect AS SYSDBA or AS SYSOPER if he wants to perform one of the tasks that require
sysdba or sysoper privileges
(such as to shutdown or to startup an instance.
If he connects as SYSDBA, he becomes SYS, if he connects as SYSOPER, he becomes PUBLIC.
This is demonstrated in the following:
First, we connect sys as sysoper:
connect sys/my_secret_password as sysoper
Who am I?
SYS@ora10> show user USER is "PUBLIC"
Same thing, but connecting as sysdba:
connect sys/my_secret_password as sysdba
Who am I?
SYS@ora10> show user USER is "SYS"
Now, I, being Rene, want to connect as sysdba and then as sysoper. In order to do so, I need to have the sysdba and sysoper
privileges:
grant sysdba, sysoper to rene;
Now, I can connect as sysdba:
connect rene/another_secret_password as sysdba
Who am I?
SYS@ora10> show user
Altough I have connected myself as Rene, giving my (not sys') password, I am sys:
USER is "SYS"
As sysoper:
connect rene/another_secret_password as sysoper
Who am I?
SYS@ora10> show user USER is "PUBLIC" Administrative connections
Apparently, an administrative connection is a session being connected as sys, sysdba (and sysoper?).
|