千家信息网

oracle中用户角色的查询和授权

发表于:2025-01-22 作者:千家信息网编辑
千家信息网最后更新 2025年01月22日,用户拥有的系统权限select privilege from dba_sys_privs where grantee='&USERNAME'union select privilege fr
千家信息网最后更新 2025年01月22日oracle中用户角色的查询和授权
用户拥有的系统权限select  privilege  from dba_sys_privs  where grantee='&USERNAME'union select  privilege  from  dba_sys_privs  where  grantee  in  (select  granted_role  from  dba_role_privs  where  grantee='&USERNAME');创建用户CREATE USER songgx       IDENTIFIED BY songgx                   DEFAULT TABLESPACE users                TEMPORARY TABLESPACE temp           QUOTA 10M ON users                           PROFILE default                            PASSWORD EXPIRE                   ACCOUNT UNLOCK;              查询用户拥有的系统权限SELECT *FROM DBA_SYS_PRIVSWHERE GRANTEE = 'LIUCH'UNION ALLSELECT *FROM DBA_SYS_PRIVSWHERE GRANTEE IN     (SELECT GRANTED_ROLE FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'LIUCH');


0