-- -----------------------------------------------------------------------------------
-- File Name    : memory_resize_ops.sql
-- Author       : DBA Learning Hub
-- Description  : Provides information about memory resize operations.
-- Requirements : Access to the v$ views.
-- Call Syntax  : @memory_resize_ops
-- Last Modified: 15/07/2025
-- -----------------------------------------------------------------------------------

SET LINESIZE 200

COLUMN parameter FORMAT A25

SELECT start_time,
       end_time,
       component,
       oper_type,
       oper_mode,
       parameter,
       ROUND(initial_size/1024/1024) AS initial_size_mb,
       ROUND(target_size/1024/1024) AS target_size_mb,
       ROUND(final_size/1024/1024) AS final_size_mb,
       status
FROM   v$memory_resize_ops
ORDER BY start_time;
