Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Accessing dba_users from PLSQL  (Oracle 9i)

Posted on 2008-06-13
2
Medium Priority
?
1,127 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 2000 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Via a live example, show how to take different types of Oracle backups using RMAN.
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.

704 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