SQL> shutdown abort .com

About DBA Queries DBA Scripts Quick Guides Other Stuff Contact
Andy only 
 

dba_ts_quotas

Name                  Null?    Type
--------------------- -------- ------------
TABLESPACE_NAME       NOT NULL VARCHAR2(30)
USERNAME              NOT NULL VARCHAR2(30)
BYTES                          NUMBER
MAX_BYTES                      NUMBER
BLOCKS                NOT NULL NUMBER
MAX_BLOCKS                     NUMBER
Describes all tablespace quota limits in the database. Lets set a quota for my user on the tools tablespace:

alter user andy quota 50m on tools;
Now query DBA_TS_QUOTAS:

col quota format a10
select username
,      tablespace_name
,      decode(max_bytes, -1, 'unlimited'
,      ceil(max_bytes / 1024 / 1024) || 'M' ) "QUOTA"
from   dba_ts_quotas
where  tablespace_name not in ('TEMP')
/

USERNAME                       TABLESPACE_NAME                QUOTA
------------------------------ ------------------------------ ----------
ANDY                           TOOLS                          50M


For more useful DBA queries click here.

Copyright© 2007-2012 Andrew Barry