Solved

How  can I check the list of objects which my user is having access?

Posted on 2014-10-30
5
262 Views
Last Modified: 2015-01-05
I assume all_objects view will provide me the list of objects which my user can access.

But I found a few tables which does not find a place in this view, but still I am able to access.

If my assumption is not correct, How I can check the list of objects which my user having access?
0
Comment
Question by:sakthikumar
5 Comments
 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 250 total points
ID: 40412848
ALL_TAB_PRIVS data dictionary view has the information you need.
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 40412872
select *
  from user_tab_privs;

Open in new window

0
 
LVL 1

Expert Comment

by:Lacca
ID: 40412891
select *
  from USER_OBJECTS;
0
 
LVL 13

Expert Comment

by:Alexander Eßer [Alex140181]
ID: 40412954
select *
  from USER_OBJECTS;

These are just those objects which are owned by the logged on user, not neccessarily those which this user is allowed to access...
0
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 250 total points
ID: 40412994
you also inherit object privileges from ROLES granted to your user, and from roles granted to those roles and so on.

To recursively search your direct privileges and inherited privileges try this...

Just change "YOUR_USER" to whatever username you're investigating.

    SELECT LPAD(' ', 3 * (LEVEL - 1)) || granted_role "User, roles and sys privs", description
      FROM (SELECT grantee, granted_role, 'Role' description FROM dba_role_privs
            UNION ALL
            SELECT grantee, privilege || ' on ' || owner || '.' || table_name, 'Object Privilege'
              FROM dba_tab_privs
            UNION ALL
            /* fake privilege query to get user names as a starting point (see START WITH clause) */
            SELECT NULL , 'YOUR_USER' , 'User'
              FROM DUAL)
START WITH grantee IS NULL
CONNECT BY grantee = PRIOR granted_role;
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Repeat query 13 72
Need SQL Query to Find Foreign-keys Without Indexed Columns 4 33
Pivoting oracle table 9 73
Excess Redo 3 32
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question