Join dba_users and dba_tab_privs to find out user privileges : dba_users « System Tables Data Dictionary « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » System Tables Data Dictionary » dba_users 
30. 46. 1. Join dba_users and dba_tab_privs to find out user privileges
SQL>
SQL>
SQL> COLUMN     object FORMAT a25
SQL> COLUMN     grantee FORMAT a15
SQL> SELECT     b.owner || '.' || b.table_name object,
  2             b.privilege what_granted, b.grantable, a.username
  3  FROM       dba_users a, dba_tab_privs b
  4  WHERE      a.username = b.grantee
  5  AND        privilege = 'EXECUTE'
  6  and        rownum < 50
  7  ORDER BY   1,2,3;

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
CTXSYS.CTX_DDL            EXECUTE                                  NO
XDB

CTXSYS.CTX_DDL            EXECUTE                                  YES
FLOWS_020100

CTXSYS.CTX_DOC            EXECUTE                                  YES
FLOWS_020100


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
CTXSYS.CTX_OUTPUT         EXECUTE                                  NO
XDB

FLOWS_020100.WWV_FLOW     EXECUTE                                  NO
FLOWS_FILES

FLOWS_020100.WWV_FLOW_EPG EXECUTE                                  NO
_INCLUDE_MODULES
ANONYMOUS

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------

FLOWS_020100.WWV_FLOW_FIL EXECUTE                                  NO
E_API
FLOWS_FILES

FLOWS_020100.WWV_FLOW_FIL EXECUTE                                  NO
E_OBJECT_ID
FLOWS_FILES


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
FLOWS_020100.WWV_FLOW_ID  EXECUTE                                  NO
FLOWS_FILES

FLOWS_020100.WWV_FLOW_SEC EXECUTE                                  NO
URITY
FLOWS_FILES

SYS.CHECK_UPGRADE         EXECUTE                                  NO
SYSTEM

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------

SYS.CHECK_UPGRADE         EXECUTE                                  NO
XDB

SYS.DBMS_ALERT            EXECUTE                                  NO
SYSTEM

SYS.DBMS_AQ               EXECUTE                                  YES
SYSTEM

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------

SYS.DBMS_AQADM            EXECUTE                                  YES
SYSTEM

SYS.DBMS_AQELM            EXECUTE                                  YES
SYSTEM

SYS.DBMS_AQ_BQVIEW        EXECUTE                                  NO
JAVA2S

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------

SYS.DBMS_AQ_IMPORT_INTERN EXECUTE                                  YES
AL
SYSTEM

SYS.DBMS_CRYPTO           EXECUTE                                  NO
FLOWS_020100

SYS.DBMS_DEFER_IMPORT_INT EXECUTE                                  NO

OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
ERNAL
SYSTEM

SYS.DBMS_FLASHBACK        EXECUTE                                  NO
FLOWS_020100

SYS.DBMS_LOCK             EXECUTE                                  NO
FLOWS_020100


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_LOCK             EXECUTE                                  NO
CTXSYS

SYS.DBMS_LOCK             EXECUTE                                  NO
MDSYS

SYS.DBMS_PIPE             EXECUTE                                  NO
CTXSYS


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_REGISTRY         EXECUTE                                  NO
CTXSYS

SYS.DBMS_REGISTRY         EXECUTE                                  NO
MDSYS

SYS.DBMS_REGISTRY         EXECUTE                                  NO
XDB


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_REPCAT           EXECUTE                                  NO
SYSTEM

SYS.DBMS_RLS              EXECUTE                                  NO
XDB

SYS.DBMS_RLS              EXECUTE                                  YES
FLOWS_020100


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_RULE_EXIMP       EXECUTE                                  YES
SYSTEM

SYS.DBMS_SERVER_ALERT     EXECUTE                                  NO
DBSNMP

SYS.DBMS_STATS            EXECUTE                                  NO
HR


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_SYSTEM           EXECUTE                                  NO
MDSYS

SYS.DBMS_SYS_ERROR        EXECUTE                                  NO
SYSTEM

SYS.DBMS_SYS_SQL          EXECUTE                                  NO
FLOWS_020100


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.DBMS_SYS_SQL          EXECUTE                                  NO
XDB

SYS.DBMS_TRANSFORM_EXIMP  EXECUTE                                  YES
SYSTEM

SYS.OUTLN_PKG             EXECUTE                                  NO
OUTLN


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.SET_TABLESPACE        EXECUTE                                  NO
XDB

SYS.SET_TABLESPACE        EXECUTE                                  NO
SYSTEM

SYS.SYS_GROUP             EXECUTE                                  NO
SYSTEM


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.UTL_FILE              EXECUTE                                  NO
XDB

SYS.UTL_FILE              EXECUTE                                  NO
FLOWS_020100

SYS.UTL_HTTP              EXECUTE                                  NO
FLOWS_020100


OBJECT                    WHAT_GRANTED                             GRA
------------------------- ---------------------------------------- ---
USERNAME
------------------------------
SYS.UTL_SMTP              EXECUTE                                  NO
FLOWS_020100

SYS.VALIDATE_CONTEXT      EXECUTE                                  NO
CTXSYS

SYS.WWV_FLOW_VAL          EXECUTE                                  NO
FLOWS_020100


49 rows selected.

SQL>
30. 46. dba_users
30. 46. 1. Join dba_users and dba_tab_privs to find out user privileges
30. 46. 2. Union user name from sys.dba_users table
30. 46. 3. Join dba_users, dba_tab_privs
30. 46. 4. Check user name and password for users
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.