Oracle Viewing tablespace utilization

Source: Internet
Author: User

SELECT DBF. tablespace_name,       DBF. Totalspace "Total (M)",       DBF. Totalblocks as total block number,       DBF. Totalspace-dfs. FREESPACE "Usage (M)",       DBF. Totalblocks-dfs. Freeblocks as uses blocks,             dfs. FREESPACE "Total remaining (M)",       dfs. Freeblocks "Number of remaining blocks",        (DFS. Freespace/dbf. Totalspace) * 100 "idle scale"   from (select t.tablespace_name,               sum (T . BYTES)/1024/1024 totalspace,               sum (t.blocks) totalblocks  &NB Sp       from Dba_data_files t         group by T.tablespace_name) dbf,        (SELECT TT. tablespace_name,               sum (TT. BYTES)/1024/1024 freespace,               sum (TT. BLOCKS) freeblocks          from Dba_free_space tt         group by TT. Tablespace_name) Dfs where TRIM (DBF. Tablespace_name) = TRIM (DFS. Tablespace_name)  select a.tablespace_name,       a.bytes/1024/1024 total,    & nbsp  b.bytes/1024/1024 used,       c.bytes/1024/1024 free,        (B.bytes * )/a.bytes "% used",        (c.bytes * +)/a.bytes "% free"   from SYS. Sm$ts_avail A, SYS. Sm$ts_used B, SYS. Sm$ts_free c where a.tablespace_name = b.tablespace_name   and a.tablespace_name = C.TABLESPACE_NAME;& nbsp
Select Total.name "tablespace name", Free_space, (total_space-free_space) used_space, Total_space FRO M (select Tablespace_name, sum (bytes/1024/1024) free_space from Sys.dba_free_space GROUP by Tablespac E_name) Free,

Oracle Viewing tablespace utilization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.