---------------
System.........: DBATools Object Name....: USERS.SQL Description....: User accounts in the database. Purpose........: Shows user account details. **************************************************************************** NOTES **************************************************************************** CHANGE HISTORY DATE USER REASON ---------- --------- ------------------------------------------------------07/20/2007 HWP Original Creation. ****************************************************************************
-- Save the SQLPlus settings to a file. STORE SET SETTINGS\USERSSETTINGS REPLACE ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY'; SET BUFFER 300 SET linesize 300 SET PAGESIZE 50 -- COLUMN USERNAME COLUMN USERNAME COLUMN ACCOUNT_STATUS COLUMN PROFILE COLUMN TEMPORARY_TABLESPACE
HEADING 'Username' FORMAT A20 FORMAT A17 FORMAT A15 FORMAT A15
FORMAT A20 WORD_WRAP
PROMPT *** Results OF @USERS.SQL ********** SELECT username, account_status, profile, lock_date, expiry_date, default_tablespace, temporary_tablespace, created FROM dba_users -- where username not in ('SYS','SYSTEM','OUTLN','WMSYS','ORDSYS', -'ORDPLUGINS','MDSYS','CTXSYS','OLAPSYS', -'RMAN','SCOTT','XDB') ORDER BY account_status, username; -- Rest SQLPlus settings back to their original settings. @SETTINGS\USERSSETTINGS