List users in Oracle database

Oracle view DBA_USERS contains a lot of useful information about database users.

Before you begin

Please note that you need need special privilege to access DBA_USERS view (usually dba).

Query

select username, account_status
from DBA_USERS

Columns

  • username - name of the user
  • account_status - account status:
    • OPEN
    • EXPIRED
    • EXPIRED(GRACE)
    • LOCKED(TIMED)
    • LOCKED
    • EXPIRED & LOCKED(TIMED)
    • EXPIRED(GRACE) & LOCKED(TIMED)
    • EXPIRED & LOCKED
    • EXPIRED(GRACE) & LOCKED

Rows

  • One row represents one user

Sample results

You can see users list on our test server. Many accounts are created during database installation.

sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.