Solved

Accessing dba_users from PLSQL  (Oracle 9i)

Posted on 2008-06-13
2
1,112 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
ID: 21781386

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
ID: 31467022
all_users worked like a champ!!
Thanks!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can i Import Access Table Into Oracle Using Toad 36 230
Not able to add the URL for the   access control list - oracle plsql 10 164
exp/imp 25 88
update statement in oracle 9 30
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

808 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