????5??Default RoleЧ??
?????????????????test????Ч?????
????SQL> conn test/test@sicsdb_linux
????Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
????Connected as test
????SQL> select * from user_role_privs;
????USERNAME                       GRANTED_ROLE                   ADMIN_OPTION DEFAULT_ROLE OS_GRANTED
????------------------------------ ------------------------------ ------------ ------------ ------------
????TEST                           CONNECT                        NO           YES          NO
????TEST                           RESOURCE                       NO           NO           NO
????TEST                           SICSPCCGROLE                   NO           NO           NO
????TEST                           SICSPCTBCGROLE                 NO           NO           NO
????TEST                           SICSPCTBTRROLE                 NO           NO           NO
????TEST                           SICSPCTRROLE                   NO           NO           NO
????TEST                           TESTROLE                       NO           NO           NO
????7 rows selected
??????session???棬??????£?
????SQL> select * from session_roles;
????ROLE
????------------------------------
????CONNECT
?????????????default role??????и??裬????????????????????
????--????resource???
????SQL> create table t (id number(10));
????create table t (id number(10))
????ORA-01031: ??????
??????????y??????
????SQL> set role resource;
????Role set
????SQL> create table t (id number(10));
????Table created
????SQL> select * from session_roles;
????ROLE
????------------------------------
????RESOURCE
?????????????????????????????á?
????SQL> select * from session_roles;
????ROLE
????------------------------------
????TESTROLE
????SQL> create table m (id number(10));
????create table m (id number(10))
????ORA-01031: ??????
???????set role all??????????н???????????衣
????SQL> set role all;
????Role set
????SQL> select * from session_roles;
????ROLE
????------------------------------
????CONNECT
????RESOURCE
????SICSPCCGROLE
????SICSPCTRROLE
????SICSPCTBCGROLE
????SICSPCTBTRROLE
????TESTROLE
????7 rows selected
???????μ??????????default role??????????衣
????SQL> conn test/test@sicsdb_linux
????Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
????Connected as test
????SQL> select * from session_roles;
????ROLE
????------------------------------
????CONNECT
???????????set role all except xxx????????????role?????
????SQL> set role all except resource;
????Role set
????SQL> select * from session_roles;
????ROLE
????------------------------------
????CONNECT
????SICSPCCGROLE
????SICSPCTRROLE
????SICSPCTBCGROLE
????SICSPCTBTRROLE
????TESTROLE
????6 rows selected
????6??????
????Oracle???role???????????????????????default role?????????????????????????????