ORACLE查看当前连接用户的权限信息或者角色信息

关于当前用户的相关信息,可以通过如下语句找到:

 SQL> select  * from all_objects where object_name like 'SESSION%';

 OWNER                          OBJECT_NAME                    SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE         CREATED     LAST_DDL_TIME TIMESTAMP           STATUS  TEMPORARY GENERATED SECONDARY  NAMESPACE EDITION_NAME
------------------------------ ------------------------------ ------------------------------ ---------- -------------- ------------------- ----------- ------------- ------------------- ------- --------- --------- --------- ---------- ------------------------------
SYS SESSION_ROLES 3486 VIEW 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:05:26 VALID N N N 1
SYS SESSION_PRIVS 3484 VIEW 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:05:26 VALID N N N 1
SYS SESSION_CONTEXT 5060 VIEW 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:06:23 VALID N N N 1
PUBLIC SESSION_ROLES 3487 SYNONYM 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:05:26 VALID N N N 1
PUBLIC SESSION_PRIVS 3485 SYNONYM 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:05:26 VALID N N N 1
PUBLIC SESSION_CONTEXT 5061 SYNONYM 2013-8-5 15 2013-8-5 15:0 2013-08-05:15:06:23 VALID N N N 1

查看当前用户具有哪些权限;

select * from session_privs;

查看当前连接用户具有的角色:

 SQL> select * from session_roles;

 ROLE
------------------------------
CONNECT
RESOURCE
DBA
SELECT_CATALOG_ROLE
上一篇:个人软件过程(psp)需求文档


下一篇:PHP学习总结