Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Next Extent Failure Notification for Locally Managed Tablespa ces
With LMT and uniform sizes, you will probably need to decide on some number of bytes free at which you holler. An example the covers DMT and LMT is below; the threshold is 30 meg.
declare v_count number := 0; begin dbms_output.enable(200000); select /*+RULE*/ count(tablespace_name) into v_count from dba_segments outer where greatest(nvl(next_extent,0),30000000) > (selectnvl(max(bytes),0) from dba_free_space where tablespace_name = outer.tablespace_name)
and segment_type not in ('ROLLBACK','TEMPORARY'); if v_count > 0 then dbms_output.put_line('BLOWOUT IMMINENT'); end if; end; /Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------