0% found this document useful (0 votes)
24 views2 pages

Tablespaces For Objects To Extend

Uploaded by

lferdji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Tablespaces For Objects To Extend

Uploaded by

lferdji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

===================================================================================

==============
======== Check the Tablespaces for objects to extend if required.
======
======== Use the following script to check Tablespace usage
======

===================================================================================
==============

set pagesize 1000 linesize 180


tti 'Tablespace Usage Status'
col "TOTAL(MB)" for 99,999,999.999
col "USAGE(MB)" for 99,999,999.999
col "FREE(MB)" for 99,999,999.999
col "EXTENSIBLE(MB)" for 99,999,999.999
col "FREE PCT %" for 999.99
col "USED PCT OF MAX %" for 999.99
col "NOTO" for 9999
col "OTO" for 999
select d.tablespace_name "NAME",d.contents "TYPE",nvl(a.bytes /1024/1024,0)
"TOTAL(MB)",nvl(a.bytes - nvl(f.bytes,0),0)/1024/1024 "USAGE(MB)",
nvl(f.bytes,0)/1024/1024 "FREE(MB)",nvl((a.bytes - nvl(f.bytes,0))/a.bytes * 100,0)
"FREE PCT %",nvl(a.ARTACAK,0)/1024/1024 "EXTENSIBLE(MB)",
nvl((a.bytes - nvl(f.bytes,0))/ (a.bytes + nvl(a.ARTACAK,0)) * 100,0) "USED PCT OF
MAX %", a.NOTO, a.OTO
from sys.dba_tablespaces d,
(select tablespace_name, sum(bytes) bytes,sum(decode(autoextensible,'YES',MAXbytes
- bytes,0 )) ARTACAK,count(decode(autoextensible,'NO',0)) NOTO,
count(decode(autoextensible,'YES',0)) OTO from dba_data_files group by
tablespace_name) a,
(select tablespace_name, sum(bytes) bytes from dba_free_space group by
tablespace_name) f
where d.tablespace_name = a.tablespace_name(+) and d.tablespace_name =
f.tablespace_name(+)
and NOT (d.extent_management like 'LOCAL'and d.contents like 'TEMPORARY')
UNION ALL
select d.tablespace_name "NAME",d.contents "TYPE",nvl(a.bytes /1024/1024,0)
"TOTAL(MB)",nvl(t.bytes,0)/1024/1024 "USAGE(MB)",
nvl(a.bytes - nvl(t.bytes,0),0)/1024/1024 "FREE(MB)",nvl(t.bytes/a.bytes * 100,0)
"FREE PCT %",
nvl(a.ARTACAK,0)/1024/1024 "EXTENSIBLE(MB)",nvl(t.bytes/(a.bytes +
nvl(a.ARTACAK,0)) * 100,0) "USED PCT OF MAX %", a.NOTO, a.OTO
from sys.dba_tablespaces d,
(select tablespace_name, sum(bytes) bytes,sum(decode(autoextensible,'YES',MAXbytes
- bytes,0 )) ARTACAK,
count(decode(autoextensible,'NO',0)) NOTO,count(decode(autoextensible,'YES',0)) OTO
from dba_temp_files
group by tablespace_name) a,
(select tablespace_name, sum(bytes_used) bytes
from v$temp_extent_pool
group by tablespace_name) t
where d.tablespace_name = a.tablespace_name(+) and d.tablespace_name =
t.tablespace_name(+) and d.extent_management like 'LOCAL'
and d.contents like 'TEMPORARY%'
order by 3 desc;
exit;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy