spool all_quot.rslt 

set linesize 80;
set pagesize 1000;
set long 50;
set echo on;

break on "USERNAME" on "TBL SPACE" on "OWNER";

/* ****************************************************** */
/*                                                        */
/* substitute the table_name variable with the new        */
/* name in CAPITAL LETTERS                                */
/*  - will show the quotas of a tablespace                */
/*                                                        */
/*         @c:\oracle\sql\all_tabs.sql                    */
/*                                                        */
/* ****************************************************** */

/* ******************************* */
/* show the size of the tablespace */
/* ******************************* */

set echo off;

select
   substr(username,1,10)                                 "USERNAME",
   substr(tablespace_name, 1, 20)                        "TBL SPACE",
   substr(to_char(bytes/1096,'999,999,999'), 1, 12)      "K-BYTES",
   substr(to_char(max_bytes/1096,'999,999,999'), 1, 12)  "MAX K-BYTES",
   substr(to_char(blocks, '999,999'), 1, 8)         "BLKS",
   substr(to_char(max_blocks, '999,999'), 1, 8)     "MAX BLKS"
from sys.dba_ts_quotas
order by 1, 2, 3;

set echo on;

set echo off;
spool off;
set long 80;
commit;





