#8 [oracle] MetaTables() tuning

open
nobody
None
5
2005-11-23
2005-11-23
Yo-han
No

It would be very nice when an extra parameter was added
to the MetaTables() function wich contains the 'owner'
of the table. Now the function only returns the tables
owned by the user wich created the connnection.

Now the function is getting the tables from the cat
table in oracle, but a better way to do it for the
tables should be something like this:

select a.owner,a.table_name
from all_tables a
where a.owner = user
union
select a.owner,a.table_name
from user_tab_privs_recd a, all_tables b
where a.owner = b.owner
and a.table_name = b.table_name;

and for views like this:

select a.owner,a.view_name
from all_views a
where a.owner = user
union
select a.owner,a.table_name
from user_tab_privs_recd a, all_views b
where a.owner = b.owner
and a.table_name = b.view_name;

by using one of these you also get the tables/views
granted to the user wich is connected.

please contact me if something is not clear, or when
you need some help.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks