ttitle -
center 'Database Freespace Summary' skip 2
comp sum of nfrags totsiz avasiz on report
break on report
col tsname format a16 justify c heading 'Tablespace'
col nfrags format 999,990 justify c heading 'Free|Frags'
col mxfrag format 999,999,990 justify c heading 'Largest|Frag (KB)'
col totsiz format 999,999,990 justify c heading 'Total|(KB)'
col avasiz format 999,999,990 justify c heading 'Available|(KB)'
col pctusd format 990 justify c heading 'Pct|Used'
select
total.tablespace_name tsname,
count(free.bytes) nfrags,
nvl(max(free.bytes)/1024,0) mxfrag,
total.bytes/1024 totsiz,
nvl(sum(free.bytes)/1024,0) avasiz,
(1-nvl(sum(free.bytes),0)/total.bytes)*100 pctusd
from
dba_data_files total,
dba_free_space free
where
total.tablespace_name = free.tablespace_name(+)
and total.file_id=free.file_id(+)
group by
total.tablespace_name,
total.bytes
/
This Blog is dedicated to administration of Oracle database, Oracle E-Business Suite, Linux, Windows, Weblogic and other miscellaneous Oracle and non-oracle products...
Ознаке
- Administration (6)
- Alias (1)
- Apex (2)
- Apps Tables (1)
- Archiving (1)
- Clean (2)
- Concurrent Managers (3)
- Configuration (1)
- DB_Link (1)
- DataDictionary (2)
- EM (3)
- Files (7)
- Filesystem (1)
- Forms (2)
- Fra (1)
- FreeSpace (2)
- Hardware (1)
- Index (1)
- Install (1)
- Invalids (3)
- Keypar (1)
- Lock (2)
- Log (4)
- Mail (1)
- Memory (2)
- Mount (4)
- Network (6)
- OUI (1)
- Parameters (3)
- Patching (6)
- Performance (2)
- Port (1)
- Process (1)
- RMAN (3)
- Runlevels (1)
- Samba (1)
- Script (2)
- Selinux (1)
- Session (5)
- Tablespace (2)
- Tablespaces (3)
- Tar (3)
- Users (4)
- Version (3)
- Vnc (2)
- Workflow (1)
- Xen (3)
- Zip/Unzip (2)
петак, 22. март 2013.
Script to Report Tablespace Free and Fragmentation
Пријавите се на:
Објављивање коментара (Atom)
Нема коментара:
Постави коментар
Напомена: Само члан овог блога може да постави коментар.