dbTalk Databases Forums  

How can I get a list of accessible tables

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss How can I get a list of accessible tables in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MCArch
 
Posts: n/a

Default How can I get a list of accessible tables - 07-31-2003 , 07:59 AM






Is there any way for an Oracle 8i user to get a list of tables to which he
has been granted Select? He doesn't own the tables and they don't list
selecting from tabs.



Reply With Quote
  #2  
Old   
Brian Peasland
 
Posts: n/a

Default Re: How can I get a list of accessible tables - 07-31-2003 , 10:31 AM






Try looking at ALL_TABLES.

HTH,
Brian

MCArch wrote:
Quote:
Is there any way for an Oracle 8i user to get a list of tables to which he
has been granted Select? He doesn't own the tables and they don't list
selecting from tabs.
--
================================================== =================

Brian Peasland
dba (AT) remove_spam (DOT) peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
the three"


Reply With Quote
  #3  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: How can I get a list of accessible tables - 07-31-2003 , 10:48 AM



MCArch wrote:

Quote:
Is there any way for an Oracle 8i user to get a list of tables to which he
has been granted Select? He doesn't own the tables and they don't list
selecting from tabs.
First, and most obviously, all tables in user_tables:

SELECT table_name
FROM user_tables

Secondly tables owned by other schemas to which you have been granted SELECT:

SELECT table_name
FROM user_tab_privs_recd
WHERE privilege = 'SELECT';

Then combine the two adding the owner:

SELECT 'MY SCHEMA' owner, table_name
FROM user_tables
UNION ALL
SELECT owner, table_name
FROM user_tab_privs_recd
WHERE privilege = 'SELECT';

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)




Reply With Quote
  #4  
Old   
Daniel Morgan
 
Posts: n/a

Default Re: How can I get a list of accessible tables - 07-31-2003 , 06:12 PM



Brian Peasland wrote:

Quote:
Try looking at ALL_TABLES.

HTH,
Brian

MCArch wrote:

Is there any way for an Oracle 8i user to get a list of tables to which he
has been granted Select? He doesn't own the tables and they don't list
selecting from tabs.

--
================================================== =================

Brian Peasland
dba (AT) remove_spam (DOT) peasland.com

Remove the "remove_spam." from the email address to email me.

"I can give it to you cheap, quick, and good. Now pick two out of
the three"
Doesn't answer the question. Tables can show up in ALL_TABLES if you are granted
any privilege ... delete, insert, update, alter, reference, etc.: Not just
SELECT.

Any there are plenty of applications where you are allowed to insert but not
select.

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.