DbAppWeb.com

Menu
  • Home
  • Linux
  • HP-UX
  • macOS
  • Windows
  • Web Servers
  • App Servers
  • Storage

How to Display Temporary Tablespace Free Space in oracle database

September 28, 2015 DbAppWeb Admin

Query:

set pagesize 60
column “Tablespace”  heading “Tablespace Name”      format a30
column “Size”        heading “Tablespace|Size (mb)” format 9999999.9
column “Used”        heading “Used|Space (SQL> mb)”      format 9999999.9
column “Left”        heading “Available|Space (mb)” format 9999999.9
column “PCTFree”     heading “% Free”               format 999.99
ttitle left “Tablespace Space Allocations”
break on reportSELECT /*+ RULE */
T.TABLESPACE_NAME,
NVL(ROUND(((SUM(U.BLOCKS)*P.VALUE)/1024/1024),
2),0) USED_MB,
T.TOT_MB,
NVL(ROUND(SUM(U.BLOCKS)*P.VALUE/1024/1024/T.TOT_MB * 100,2),0) “USED %”
FROM     GV$SORT_USAGE USQL> ,
GV$PARAMETER P,
(SELECT   TABLESPACE_NAME,
SUM(BYTES)/1024/1024 TOT_MB
FROM     DBA_TEMP_FILES
GROUP BY TABLESPACE_NAME) T
WHERE    P.NAME = ‘db_block_size’
AND U.TABLESPACE (SQL> +)  = T.TABLESPACE_NAME
GROUP BY T.TABLESPACE_NAME,
P.VALUE,
T.TOT_MB
ORDER BY 1,   2;ttitle off
clear columns
clear computes
clear breaks

 Result:

TABLESPACE_NAME  USED_MB     TOT_MB USED %
—————————— ———- ———- ———————–
TEMP                                   100                500              20

 

Related Posts

  • How to query tablespace usage in Oracle Database?
  • How to query uptime for Oracle Database?
  • How to generate AWR/ADDM report as normal database user ?

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
Prev Article
Next Article
Tags:Oracle Database

No Responses

  1. Pingback: How to query uptime for Oracle Database? - DbAppWeb.com
  2. Pingback: How to query tablespace usage in Oracle Database? - DbAppWeb.com

Leave a Reply Cancel Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Popular
  • Recent

Categories

  • Android (2)
  • Blogger (16)
  • Domain and Hosting (1)
  • Hardware Issues (7)
  • HP-UX (55)
  • HPE Data Protector (9)
  • IBM Lotus Notes (2)
  • IBM WebSphere Application Server (16)
  • Internet Tips & Tricks (15)
  • iOS (8)
  • JBoss/WildFly Application Server (2)
  • Linux (76)
  • macOS (15)
  • Microsoft Windows (31)
  • News and Updates (11)
  • Oracle Database (5)
  • SSL/TLS (1)
  • Storage Servers (23)
  • Tools/Softwares (1)
  • VMware ESXi (17)
  • Web Servers (14)
  • WordPress (5)

Archives

DbAppWeb.com

Solution of Database, Application and Web Server Problems

About DbAppWeb.com

One Stop Solution for Database Server, Application Server and Web Server Problems.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

DbAppWeb on Social Media

Copyright © 2025 DbAppWeb.com
Terms and Conditions   Theme by MyThemeShop.com