Which two statements are true when row archival management is enabled?
A.
The ORA_ARCHIVE_STATE column visibility is controlled by the ROW ARCHIVAL VISIBILITY session
parameter.
B.
The ORA_ARCHIVE_STATE column is updated manually or by a program that could reference activity
tracking columns, to indicate that a row is no longer considered active.
C.
The ROW ARCHIVAL VISIBILITY session parameter defaults to active rows only.
D.
The ORA_ARCHIVE_STATE column is visible if referenced in the select list of a query.
E.
The ORA_ARCHIVE_STATE column is updated automatically by the Oracle Server based on activity
tracking columns, to Indicate that a row is no longer considered active.
Explanation:
A: Below we see a case where we set the row archival visibility parameter to “all” thereby
allowing us to see all of the rows that have been logically deleted:
alter session set row archival visibility = all;We can then turn-on row invisibility back on by changing row archival visibility = “active”:
alter session set row archival visibility = all;
B: To use ora_archive_state as an alternative to deleting rows, you need the following settings and
parameters:
1. Create the table with the row archival clause
create table mytab (col1 number, col2 char(200)) row archival;
2. Now that the table is marked as row archival, you have two methods for removing rows, a permanent
solution with the standard delete DML, plus the new syntax where you set ora_archive_state to a non-zero
value:
update mytab set ora_archive_state=2 where col2=’FRED’;
3. To make “invisible rows” visible again, you simply set the rows ora_archive_state to zero:
update mytab set ora_archive_state=0 where col2=’FRED’;
Note:
* Starting in Oracle 12c, Oracle provides a new feature that allow you to “logically delete” a row in a table
without physically removing the row. This effectively makes deleted rows “invisible” to all SQL and DML, but
they can be revealed at any time, providing a sort of “instant” rollback method.
To use ora_archive_state as an alternative to deleting rows.
I would choose c & D.
I will pick B & D.
C is correct too.
Can anyone comment on B?