Home   Oracle SQL Scripts   Contact link Contact:  jack@dughaille.info

Description:
Lists basic details of user accounts, short for 'user only'; see udets.sql for a more detailed user report.

Example output:
SQL> @uo Like user: sys USERNAME ACCOUNT_STATUS DEFAULT_TABLESPACE CREATED PROFILE LOCK_DATE EXPIRY_DATE TEMPORARY_TABLESPACE USER_ID INITIAL_RSRC_CONSUMER_GROUP EXTERNAL_NAME ------------------------------ ---------------- ------------------------------ ------------------- ------------------------------ ------------------- ------------------- ------------------------- ---------- ------------------------------ -------------------- APPQOSSYS EXPIRED & LOCKED SYSAUX 17/09/2011 09:52:28 DEFAULT 17/09/2011 09:52:28 17/09/2011 09:52:28 TEMP 31 DEFAULT_CONSUMER_GROUP DEVSYS LOCKED SYSAUX 17/09/2011 09:58:00 PPLE_SCHEMA_PROFILE 16/04/2012 12:00:56 TEMP 43 DEFAULT_CONSUMER_GROUP EXFSYS LOCKED SYSAUX 17/09/2011 09:57:46 PPLE_SCHEMA_PROFILE 17/09/2011 09:57:46 TEMP 42 DEFAULT_CONSUMER_GROUP MDSYS LOCKED SYSAUX 17/09/2011 10:00:09 PPLE_SCHEMA_PROFILE 17/09/2011 10:00:09 TEMP 57 DEFAULT_CONSUMER_GROUP OLAPSYS LOCKED SYSAUX 17/09/2011 10:04:19 DEFAULT 17/09/2011 10:04:19 13/10/2012 13:15:11 TEMP 60 DEFAULT_CONSUMER_GROUP ORDSYS LOCKED SYSAUX 17/09/2011 10:00:09 PPLE_SCHEMA_PROFILE 17/09/2011 10:00:09 TEMP 53 DEFAULT_CONSUMER_GROUP OWBSYS EXPIRED & LOCKED SYSAUX 17/09/2011 10:21:02 DEFAULT 17/09/2011 10:21:08 17/09/2011 10:21:08 TEMP 78 DEFAULT_CONSUMER_GROUP SYS OPEN SYSTEM 17/09/2011 09:46:22 PPLE_ORACLE_SYS_PROFILE TEMP 0 SYS_GROUP SYSMAN LOCKED SYSAUX 17/09/2011 10:09:57 PPLE_DBA_EXP_PROFILE 17/09/2011 10:21:08 15/07/2012 13:15:11 TEMP 71 DEFAULT_CONSUMER_GROUP SYSTEM OPEN SYSTEM 17/09/2011 09:46:22 PPLE_ORACLE_SYS_PROFILE TEMP 5 SYS_GROUP TSMSYS EXPIRED & LOCKED USERS 16/04/2012 15:43:15 PPLE_DBA_PROFILE 16/04/2012 15:43:15 16/04/2012 15:43:15 TEMP 382 DEFAULT_CONSUMER_GROUP WMSYS LOCKED SYSAUX 17/09/2011 09:53:14 PPLE_SCHEMA_PROFILE 17/09/2011 09:53:14 TEMP 32 DEFAULT_CONSUMER_GROUP 12 rows selected. SQL>

Script:
prompt col external_name for a20 col username for a30 col account_status for a16 col temporary_tablespace for a25 accept x_likeuser prompt "Like user: " select username, account_status, default_tablespace, created, profile, lock_date, expiry_date, temporary_tablespace, user_id, initial_rsrc_consumer_group, external_name from dba_users where username like upper( '%&&x_likeuser%' ) order by username;