Oracle DBMS_IMMUTABLE_TABLE
Version 21c

General Information
Library Note Morgan's Library Page Header
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 Allows deletion of expired rows in an immutable table
AUTHID CURRENT_USER
Dependencies
DBMS_ASSERT DBMS_BLOCKCHAIN_TABLE_LIB DBMS_UTILITY
Documented Yes
Exceptions
Error Code Reason
ORA-05771 <table_name> is not an immutable table
First Available Yes: Packages and Types Reference
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(default, UNSUPPORTED);
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsbctab.sql
 
DELETE_EXPIRED_ROWS (new 21.3c)
Undocumented dbms_immutable_table.delete_expired_rows(
schema_name            IN  VARCHAR2,
table_name             IN  VARCHAR2,
before_timestamp       IN  TIMESTAMP WITH TIME ZONE DEFAULT NULL,
number_of_rows_deleted OUT NUMBER);
DECLARE
 delRows INTEGER;
BEGIN
  dbms_immutable_table.delete_expired_rows('C##UWCLASS', 'AUDIT_LOG', SYSDATE-90, delRows);
  dbms_output.put_line(TO_CHAR(delRows));
END;
/
42

Related Topics
Built-in Functions
Built-in Packages
Database Security
BlockChain Tables
DBMS_BLOCKCHAIN_TABLE
Immutable Tables
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2022 Daniel A. Morgan All Rights Reserved
  DBSecWorx