How to view all of the table spaces for Oracle ____oracle

Source: Internet
Author: User
SQL: Method One: Select Dbf.tablespace_name, Dbf.totalspace "Total (m)", Dbf.totalblocks as Total block number, dfs.freespace "remaining total (m)", Dfs.freebl Ocks "Number of remaining blocks", (dfs.freespace/dbf.totalspace) * 100 "free proportions" from (select T.tablespace_name, sum (t.bytes)/1024/1024 tot Alspace, sum (t.blocks) totalblocks 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) method two: Select Total.name "tablespace name", Free_space, (Total_spac E-free_space) Used_space, total_space from (select Tablespace_name, sum (bytes/1024/1024) free_space from Sys.dba_free_ Space GROUP by Tablespace_name) free, (select B.name, sum (bytes/1024/1024) Total_space from Sys.v_$datafile A, sys.v_$tab Lespace B where a.ts# = b.ts# GROUP by b.name) Total where free.tablespace_name = Total.name
Related Article

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.