Accessing dba_users from PLSQL (Oracle 9i)

I have a procedure where I want to loop through the users. I thought I could do something like:
  FOR PROD_USERS IN (SELECT USERNAME FROM SYS.dba_users WHERE USERNAME LIKE '%PROD%')
however, during compile it stops and says the table doesn't exist (ORA - 00942)
I can however access it from the same schema that I have the package in.

how do I get at the usernames/schemas inside PLSQL?
GNOVAKAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MikeOM_DBAConnect With a Mentor Commented:

Did you try without the SYS.?
Do you have privileges to select from DBA views?
You also could try ALL_USERS.
0
 
GNOVAKAuthor Commented:
all_users worked like a champ!!
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.