Solved

Accessing dba_users from PLSQL  (Oracle 9i)

Posted on 2008-06-13
2
1,106 Views
Last Modified: 2013-12-19
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?
0
Comment
Question by:GNOVAK
2 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 500 total points
Comment Utility

Did you try without the SYS.?
Do you have privileges to select from DBA views?
You also could try ALL_USERS.
0
 

Author Closing Comment

by:GNOVAK
Comment Utility
all_users worked like a champ!!
Thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now