Oracle - List User Accounts In The Database.

  • Uploaded by: Harlan Pooley
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Oracle - List User Accounts In The Database. as PDF for free.

More details

  • Words: 122
  • Pages: 1
---------------

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

Related Documents


More Documents from ""