Solved

BELONGS TO particular schema

Posted on 2014-04-24
8
300 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 76

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 76

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 500 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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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 information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
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…

758 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

20 Experts available now in Live!

Get 1:1 Help Now