User Tools

Site Tools


indatabasearchiving

This is an old revision of the document!


In Database Archiving

Enabling

Can be enabled with CREATE or ALTER TABLE commands …

CREATE TABLE employees (
  id          NUMBER,
  description VARCHAR2(20)
) ROW ARCHIVAL;

ALTER TABLE employees ROW ARCHIVAL;

This will create a hidden column called ORA_ARCHIVE_STATE.
By default this column will have a value of 0 for each row.
You can now use update statements to alter the value of this column.

Disabling

ALTER TABLE employees NO ROW ARCHIVAL;

Displaying Archived Rows

-- Make archived rows visible.
ALTER SESSION SET ROW ARCHIVAL VISIBILITY = ALL;

-- Make archived rows invisible again.
ALTER SESSION SET ROW ARCHIVAL VISIBILITY = ACTIVE;
indatabasearchiving.1437561797.txt.gz · Last modified: 2025/03/08 22:23 (external edit)