Solved

Accessing dba_users from PLSQL  (Oracle 9i)

Posted on 2008-06-13
2
1,107 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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Finace 3 66
Getting TNS:Connect timeout occurred while opening the application 5 56
Need a replacement data type in Oracle 6 65
Best RAID for a BDD Oracle 4 61
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

912 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

16 Experts available now in Live!

Get 1:1 Help Now