Solved

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

Posted on 2014-10-30
5
256 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 73

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

815 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now