var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
i've got a really strange problem with the privilege in Oracle users.
The query that validates if its' dba or not it's:
SELECT CASE WHEN SYS_CONTEXT('USERENV', 'ISDBA') = 'TRUE' THEN 1 ELSE 0 END isdba FROM DUAL
But this allways give me FALSE!!! even if the user it's show in this select:
select * from dba_users.
What's wrong in the select that need's anything else more to know if the user it's DBA????
ISDBA does not detect whether you are a DBA or not. It returns TRUE if you are logged on as 'SYS'.
then how to know???
Then how to know if i'm dba or not???
Ask yourself: "Am I a DBA or not?"
It seems not, because - if you were, you'd know the answer.
I'm also not a DBA, but I'd query DBA_ROLE_PRIVS and search for grantees who have DBA role granted.
We go with session_roles to do the same
function user_is_dba_fn return boolean
where role = 'DBA';
if l_is_dba = 0 then
Thks for the sudgestions is_dba
Finally looks like the concept was wrong...
the users can log in as 3 forms
but only if the user log-in as sysdba the query finally wone give me TRUE.
SQL>connect id/password as sysdba
SELECT userenv('ISDBA') FROM dual;