How do I get a list of locked users in an Oracle database?

ninesided picture ninesided · Oct 10, 2009 · Viewed 188.2k times · Source

I want to be able to list all of the users in a given database along with an icon that determines whether they are locked or not. The problem I'm having is querying the "locked" status for a given user, I though it might have been on all_users but it isn't. Can anyone point me in the right direction?

Answer

ninesided picture ninesided · Oct 10, 2009

Found it!

SELECT username, 
       account_status
  FROM dba_users;