Link to home
Start Free TrialLog in
Avatar of vangogpeter
vangogpeter

asked on

BELONGS TO particular schema

How will you spool  select access to a particular schema
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Can you clarify what you are asking?

The 'spool' command is a specific sqlplus command but I'm not sure you are asking about that.
Avatar of vangogpeter

ASKER

just to spool out the select on privilege of that particual schema.
please

only that schema only.
Easiest way is to connect as that specific user and do:
select * from session_privs;
or
select * from ALL_TAB_PRIVS_RECD;




doc excerpts:
-------------------------------
ALL_TAB_PRIVS_RECD describes the following types of grants:
•Object grants for which the current user is the grantee
•Object grants for which an enabled role or PUBLIC is the grantee

http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_2112.htm#i1591573

SESSION_PRIVS describes the privileges that are currently available to the user.

http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_5176.htm#sthref2733

If you want to query them for a user but are connected as another it becomes more complex.

You would need to go through a list of views.

I will probably miss some but here are the ones(I think):
dba_sys_privs
dba_role_privs
ASKER CERTIFIED SOLUTION
Avatar of Wasim Akram Shaik
Wasim Akram Shaik
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>try this

I don't think it is that simple.  I can have select permission on objects that were granted through a role (either explicitly granted or inherited through the 'select any' grant).

I don't think the posted select will catch that.
yes.. I too agree with that.. missed out that part ( role and select any).. author please note what steve has suggested..
If author is looking out for what has been posted in my comment( as an answer) then there is no harm in accepting that as a solution.

If there is something more then what I posted would not be a complete solution.

I would be glad if my post serves the Asker's purpose..

I would never mind and would not expect any points for this question if my post doesn't serve any purpose to author.