← Users & Privileges
Oracle · Users & Privileges

How to list all users in an Oracle database

List every account in an Oracle database from DBA_USERS: status, tablespaces, profile, and key dates.

Tested on11g12c19c21c23ai26ai

Every account in the database, straight from DBA_USERS, with account status, default and temporary tablespace, profile, and the created, expiry, and lock dates. A quick inventory to start any user review. Needs SELECT_CATALOG_ROLE or a DBA account.

SELECT username,
       account_status,
       default_tablespace,
       temporary_tablespace,
       profile,
       created,
       expiry_date,
       lock_date
FROM   dba_users
ORDER  BY username;
usersdba_usersaccounts