We help IT Professionals succeed at work.
Get Started

Oracle 11.2.0.1.0:  permission problem by using dba_tables

wantime
wantime asked
on
5,326 Views
Last Modified: 2012-05-12
hello all,

i have an oracle database 'testdb' and a java application which using this database.

when any database user connect to this database by this java application, it should be detected at first, if this database exisits and does not have any tables. i.e, the database should be empty.

following statement works if the database user has whole permission on database.

select count(*) from dba_tables where owner='testdb'

the question is:

if database user doesn't have permission on "dba_tables", this statement can not be executed.
are there any way to let such database use to find out, if this database exisits and does not have any tables?

thanks,
wantime
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 8 Answers and 15 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE