Solved

BELONGS TO particular schema

Posted on 2014-04-24
8
306 Views
Last Modified: 2014-05-13
How will you spool  select access to a particular schema
0
Comment
Question by:vangogpeter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 77

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 77

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 77

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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 explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

690 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