Hello,
In Oracle, the following SQL statements can be executed without error:
GRANT some_role TO SYS;
ALTER USER SYS DEFAULT ROLE some_role;
After this, the role appears in the data dictionary with DEFAULT_ROLE = YES
.
However, when logging in as SYS
and running:
SELECT * FROM SESSION_ROLES;
The result is empty — the role does not appear to be active in the session.
This leads to a few questions:
- Is it actually supported or effective to assign default roles to the
SYS
user?
- Even though the SQL succeeds and updates the metadata, does Oracle use this information at runtime for
SYS
?
- Is there any official Oracle documentation or guidance that explains whether
SYS
honors default roles?
Any clarification or reference from Oracle documentation would be appreciated.
Thanks in advance!