How to view the usage of temporary tablespace in Oracle?

To check the usage of the Oracle temporary tablespace, you can use the following query statement:

SELECT tablespace_name, bytes_used/1024/1024 AS used_mb, bytes_free/1024/1024 AS free_mb, bytes_used/1024/1024 + bytes_free/1024/1024 AS total_mb 
FROM v$temp_space_header;

This query will retrieve the name of the temporary tablespace, the space used (in MB), the remaining space (in MB), and the total space (sum of used and remaining space, in MB).

Note: This query statement is to be run under a user with administrative rights in the Oracle database in order to execute it successfully.

bannerAds