User Tools

Site Tools


indatabasearchiving

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
indatabasearchiving [2015/07/22 10:37] – created z0hpvkindatabasearchiving [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ===== In Database Archiving ===== ===== In Database Archiving =====
 +==== Enabling ====
 Can be enabled with CREATE or ALTER TABLE commands ... Can be enabled with CREATE or ALTER TABLE commands ...
 <code>CREATE TABLE employees ( <code>CREATE TABLE employees (
Line 7: Line 8:
  
 ALTER TABLE employees ROW ARCHIVAL;</code> ALTER TABLE employees ROW ARCHIVAL;</code>
 +
 +This will create a hidden column called ORA_ARCHIVE_STATE.\\
 +By default this column will have a value of 0 for each row.\\
 +Any value greater than zero makes a SELECT statement ignore this row when ROW ARCHIVAL VISIBILITY is set to ACTIVE.\\
 +
 +==== Disabling ====
 +<code>ALTER TABLE employees NO ROW ARCHIVAL;</code>
 +
 +==== Displaying Archived Rows ====
 +<code>-- Make archived rows visible.
 +ALTER SESSION SET ROW ARCHIVAL VISIBILITY = ALL;
 +
 +-- Make archived rows invisible again.
 +ALTER SESSION SET ROW ARCHIVAL VISIBILITY = ACTIVE;</code>
indatabasearchiving.1437561457.txt.gz · Last modified: 2025/03/08 22:23 (external edit)