Oracle Tablespace High Water Mark (HWM) Query
๐ Purpose: To calculate the High Water Mark (HWM) in GB for each data file. The HWM is the highest block ever used by an object in the tablespace. ๐งพ Query: SELECT a.tablespace_name, a.file_name, ((b.maximum + c.blocks - 1) * d.db_block_size) / 1024 / 1024 / 1024 AS highwater_in_GB FROM dba_data_files a, (SELECT file_id, MAX(block_id) AS maximum FROM dba_extents GROUP...