Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view the remaining tablespaces in Oracle database

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how to view the rest of the Oracle database tablespaces. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

1) View the name and size of the tablespace physical file

SELECT tablespace_name

File_id

File_name

Round (bytes/ (1024 / 1024 / 1024), 2) | | 'GB' total_space

FROM dba_data_files

ORDER BY tablespace_name

2) View the use of tablespaces

SELECT round (SUM (bytes) / (1024 / 1024 / 1024), 2) | 'GB' AS free_space, tablespace_name

FROM dba_free_space

GROUP BY tablespace_name

3) View the use of tablespaces

SELECT a.tablespace_name

Round (a.bytes/ (1024 / 1024 / 1024), 2) | | 'GB' total

Round (b.bytes/ (1024 / 1024 / 1024), 2) | | 'GB' used

Round (c.bytes/ (1024 / 1024 / 1024), 2) | | 'GB' free

Round ((b.bytes * 100) / a.bytes) | |'%'"% USED'

Round ((c.bytes * 100) / 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

Thank you for reading! This is the end of the article on "how to view the remaining tablespaces in Oracle database". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report