users.sql

-- 
--   This command file provides a list of all database users, their
--   default and temporary tablespaces, and their profiles.
--   DBA use only.  James H. Ge 
-- 
--   usage:  @users
-- 
column "USERNAME"               format a20;
column "ID"                     format 9999;
column "DEFAULT TABLESPACE"     format a25;
column "TEMPORARY TABLESPACE"   format a25;
--
set linesize 150
--
select username               "USERNAME",
       user_id                "ID",
       default_tablespace     "DEFAULT TABLESPACE",
       temporary_tablespace   "TEMPORARY TABLESPACE",
       profile
  from dba_users 
  where username not like 'SYS%'
  order by default_tablespace   desc,
           username             asc;
-- 
clear columns;