This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
info:oracle:accounts_with_objects [2013-02-04 22:17] 127.0.0.1 external edit |
info:oracle:accounts_with_objects [2013-03-01 20:26] (current) andunix |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Oracle: List Accounts with Objects ====== | ====== Oracle: List Accounts with Objects ====== | ||
- | This page was moved to http://andunix.net/ | + | |
+ | To list all accounts (users) the objects (like tables), you can query them with: | ||
+ | |||
+ | <code sql> | ||
+ | SELECT DISTINCT OWNER FROM DBA_OBJECTS ORDER BY OWNER; | ||
+ | </ | ||
+ | |||
+ | If you want to list all accounts, you can query them with: | ||
+ | |||
+ | <code sql> | ||
+ | SELECT USERNAME FROM ALL_USERS ORDER BY USERNAME; | ||
+ | </code> | ||
+ | |||
+ | Or, if you only want the DBAs: | ||
+ | |||
+ | <code sql> | ||
+ | SELECT USERNAME FROM DBA_USERS ORDER BY USERNAME; | ||
+ | </code> | ||
+ | |||
+ | {{tag> |