Solved

BELONGS TO particular schema

Posted on 2014-04-24
8
305 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

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!

Question has a verified solution.

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

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to take different types of Oracle backups using RMAN.

734 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