Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

BELONGS TO particular schema

Posted on 2014-04-24
8
Medium Priority
?
314 Views
Last Modified: 2014-05-13
How will you spool  select access to a particular schema
0
Comment
Question by:vangogpeter
  • 3
  • 3
8 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40020705
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.
0
 

Author Comment

by:vangogpeter
ID: 40020716
just to spool out the select on privilege of that particual schema.
please

only that schema only.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40020743
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
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 2000 total points
ID: 40020864
==>just to spool out the select on privilege of that particual schema.
==>please only that schema only.

are you looking out for something like this, SELECT privileges on objects owned by a particular schema, try this

select a.* from dba_tab_privs a, dba_objects b
where a.owner=b.owner
and a.privilege='SELECT'
and b.owner=<SCHEMA_NAME>
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40020884
>>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.
0
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 40020900
yes.. I too agree with that.. missed out that part ( role and select any).. author please note what steve has suggested..
0
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 40030176
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.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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 video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Suggested Courses

926 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