Run this sql statement SELECT /* + RULE */ df.tablespace_name "Tablespace", df.bytes / (1024 * 1024) "Size (MB)", SUM(fs.bytes) / (1024 * 1024) "Free (MB)", Nvl(Round(SUM(fs.bytes) * 100 / df.bytes),1) "% Free", Round((df.bytes - SUM(fs.bytes)) * 100 / df.bytes) "% Used" FROM dba_free_space fs, (SELECT tablespace_name,SUM(bytes) bytes FROM dba_data_files GROUP BY tablespace_name) df WHERE fs.tablespace_name (+) = df.tablespace_name GROUP BY df.tablespace_name,df.bytes UNION ALL SELECT /* + RULE */ df.tablespace_name tspace, fs.bytes / (1024 * 1024), SUM(df.bytes_free) / (1024 * 1024), Nvl(Round((SUM(fs.bytes) - df.bytes_used) * 100 / fs.bytes), 1), Round((SUM(fs.bytes) - df.bytes_free) * 100 / fs.bytes) FROM dba_temp_files fs, (SELECT tablespace_name,bytes_free,bytes_used FROM v$temp_space_header GROUP BY tablespace_name,bytes_free,bytes_used) df WHERE fs.tablespace_name (+) = df.tablespace_name GROUP BY df.tablespace_name,fs.bytes,df.bytes_free,df.bytes_used ORDER BY 4 DESC; |
Welcome to our blog dedicated to solving Information Technology dilemmas. Gain insights from expert advice on tackling IT challenges effectively. From troubleshooting software glitches to optimizing network performance, we provide actionable solutions for a seamless IT experience. Discover innovative strategies to address cybersecurity concerns, data management issues, and technology trends. Dive into a world of IT problem-solving expertise that empowers your digital journey.
Friday, 15 July 2011
Free & Used Space in Tablespace from SQL
Subscribe to:
Post Comments (Atom)
The Best AI Apps for Android That Make Your Smartphone Smarter
The Best AI Apps for Android That Make Your Smartphone Smarter Introduction: In today's digital age, artificial intelligence (AI) ...
-
Future of Metaverse For context, we currently have three major metaverses: Web 3.0; Decentraland; and Fortnite. If you don’t know what the...
-
10 Best Online Earning Options for Beginners: Your Path to Financial Freedom Introduction: In today's digital age, the internet has op...
-
If you have setup the script to perform auto backup with media manager like Netbackup then you must need to setup the RMAN backup log file a...
No comments:
Post a Comment