ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
The source code for the package specification and body are listed below but the origin of how it got into the 21.3 database, and what it is intended to accomplish, is still a mystery.
That said, it is a decent piece of work and I want to thank whoever thought to put it there.
AUTHID
DEFINER
Dependencies
DBMS_OUTPUT
V_$SYSSTAT
Documented
No
First Available
21c
Security Model
Owned by SYS with no privileges granted
Source: Formatted for clarity
cd $ORACLE_HOME
grep -ir "REDO_DIFF"
did not identify a single file that contained this string.
CREATE OR REPLACE NONEDITIONABLE PACKAGE "SYS"."REDO_DIFF" AUTHID DEFINER IS
PROCEDURE diff_it;
END redo_diff;
/
CREATE OR REPLACE NONEDITIONABLE PACKAGE BODY "SYS"."REDO_DIFF" IS
s NUMBER;
--=========================================
FUNCTION get_size RETURN NUMBER IS
s_ NUMBER;
BEGIN
SELECT value
INTO s_
FROM sys.v_$sysstat
WHERE name = 'redo size';
RETURN s_;
END get_size;
--=========================================
PROCEDURE diff_it IS
s_new NUMBER;
BEGIN
s_new := get_size;
dbms_output.put_line('redo diff: ' || TO_CHAR(s_new - s));
s := s_new;
END diff_it;
--=========================================
-- intialization section
BEGIN
s := get_size;
END redo_diff;
/
DIFF_IT (new 21c)
Reports the amount of redo generated in by the system from the time of initialization in the current session until it is rerun