Search This Blog

Total Pageviews

Wednesday, 2 November 2011

Oracle Tablespace per User report

set termout off
set newpage 0
set pagesize 60
set linesize 75
set feedback off
set trimout on
set verify on
set wrap on
set termout off
set echo off

spool tssumuser.rslt
ttitle center 'TSSUSER - Database Tablespace per User Summary' skip 1 -
left "PAGE:" sql.pno format 999 right CWS_DATE skip 2

col username format a20 heading 'Username' justify c
col tablespace_name format a20 heading 'Tablespace Name' justify c
col mquota format a12 heading 'MB Quota' justify c
col mbytes format 999,999,990.99 heading 'MB Used' justify c

break on username

select
username,
tablespace_name,
decode(greatest(max_bytes, -1), -1, 'Unrestricted',
to_char(max_bytes/1048576, '999,999,990')) mquota,
bytes/1048576 mbytes
from
sys.dba_ts_quotas
where
(max_bytes != 0) or
(bytes != 0)
order by
1,3;

clear col
clear bre



TSSUSER - Database Tablespace per User Summary
PAGE: 1 CWS_DATE

Username Tablespace Name MB Quota MB Used
-------------------- -------------------- ------------ ---------------
ANUJTEST ANUJTEST Unrestricted 7.00
APPQOSSYS SYSAUX Unrestricted 0.00
FLOWS_FILES SYSAUX Unrestricted 0.00
OLAPSYS SYSAUX Unrestricted 7.31
PERFSTAT PERFSTAT Unrestricted 114.00
RMAN RMAN Unrestricted 5.94
RRR USERS Unrestricted 0.00

No comments:

Oracle DBA

anuj blog Archive