In order to exercise the SYSDBA privilege, a user must connnect «*as sysdba*».
The SYSDBA privilege cannot be granted to PUBLIC.
Granting SYSDBA to a user
If a user is granted the SYSDBA privilege, this privilege is recorded in the password file, not in DBA_SYS_PRIVS
:
select
username,
sysdba,
last_login
from
v$pwfile_users;
select * from dba_sys_privs where grantee = 'RENE' and privilege = 'SYSDBA';
grant sysdba to rene;
select
username,
sysdba,
last_login
from
v$pwfile_users;
--
-- RENE now found in v$pwfile_users
--
select * from dba_sys_privs where grantee = 'RENE' and privilege = 'SYSDBA';
--
-- RENE still not found in v$pwfile_users
--
revoke sysdba from rene;
select
username,
sysdba,
last_login
from
v$pwfile_users;
--
-- RENE gone from in v$pwfile_users
--