????Oracle Default Role
???????????? ???????[ 2014/12/16 14:32:44 ] ????????????? Oracle ???
????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?????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11