Sunday, October 17, 2021

Check temporary tablespace of CDB or PDB databases

 

Check temporary tablespace of CDB or PDB databases

CDB or PDB temporary tablespace files details:


col db_name for a10 col tablespace_name for a10 col file_name for a25 SELECT vc2.name "db_name",tf.file_name, tf.tablespace_name, autoextensible, maxbytes/1024/1024 "Max_MB", SUM(tf.bytes)/1024/1024 "MB_SIZE" FROM v$containers vc2, cdb_temp_files tf WHERE vc2.con_id = tf.con_id GROUP BY vc2.name,tf.file_name, tf.tablespace_name, autoextensible, maxbytes ORDER BY 1, 2;


Check the aggregated size of temporary tablespace for CDB or PDB databases

Col name for a10col tablespace_name for a15
SELECT  vc2.name, tf.tablespace_name, sum(decode(autoextensible,'NO',bytes,'YES',maxbytes))/1024/1024 "Max Bytes", SUM(tf.bytes)/1024/1024
FROM v$containers vc2, cdb_temp_files tf
WHERE vc2.con_id = tf.con_id
GROUP BY vc2.name, tf.tablespace_name
ORDER BY 1, 2;

No comments: