Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL can't see all tables in "all_tables"

839266Feb 12 2011 — edited Dec 26 2012
I'm trying to create a stored procedure that uses "all_tables" to look at tables belonging to other users.

If I run a simple SELECT on "all_tables" outside of PL/SQL, I can see every table in the database. However if I try creating and executing a procedure that does the same thing on "all_tables", it'll only be able to see some of the tables (I think only those belonging to me). My account has been granted DBA privileges, and the same thing happens if I create and execute this procedure from the SYSTEM account.

Why can't PL/SQL see all of the tables I can? I've tried granting myself SELECT privileges on "all_tables" from the SYSTEM account, and I've also tried using "dba_tables" instead, but PL/SQL can't see that view.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2013
Added on Feb 12 2011
5 comments
2,744 views