oracle10g和11g关于角色口令的区别(三)

2014-11-24 09:08:50 · 作者: · 浏览: 2
----------------------- ------- ----------
T TABLE
VIEW_T VIEW

TYGER@ORA11G>create table t1(x int);
create table t1(x int)
*
ERROR at line 1:
ORA-01031: insufficient privileges

8. 重新登录会话,权限恢复原样

TYGER@ORA11G>conn tyger/tyger
Connected.
TYGER@ORA11G>create table t1(x int);

Table created.

TYGER@ORA11G>select username,granted_role,default_role from user_role_privs;

USERNAME GRANTED_ROLE DEFAULT_ROLE
---------- -------------------- --------------------
TYGER TYGER_RO1 YES
TYGER TYGER_RO2 NO

总结:

在oracle 11g 中,带有口令的角色赋予用户,默认情况下是失效的,当 set role 生效后,其他角色所具有的权限失效, 只在当前会话有效