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.
A is wrong. The visability is NOT controlled by this parameter, the values are. The ORA_ARCHIVE_STATE column is visible if referenced in the select list of a query. (D). C is also right FOR SURE.
B looks good to me too, but than we’re having 3 good answers…..
B is wrong. The “OR by a program that could reference
activity tracking columns” is false
For me, CD
SQL> alter table sales row archival;
Table altered.
SQL> select distinct ora_archive_state from sales;
ORA_ARCHIVE_STATE
——————————————————————————–
0
AC
AD
Right Answer should be : C,D
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/ilm/row_archival/row_archival.html
CD
A&D
B&D
I’m sorry. According to my test, A is wrong.
C is right :
http://docs.oracle.com/database/121/SQLRF/statements_2015.htm#SQLRF00901
ROW ARCHIVAL VISIBILITY
Use this clause to configure row archival visibility for the session. This clause lets you implement In-Database Archiving, which allows you to designate table rows as active or archived. You can then perform queries on only the active rows within the table.
If you specify ACTIVE, then the database will consider only active rows when performing queries on tables that are enabled for row archival. This is the default.
If you specify ALL, then the database will consider all rows when performing queries on tables that are enabled for row archival.
D is right, it’s just an invisible column
SQL> create table toto ( c integer ) row archival;
Table created.
SQL> insert into toto values (1);
1 row created.
SQL> select c,ora_archive_state from toto;
C
———-
ORA_ARCHIVE_STATE
——————————————————————————–
1
0
Here are a few of the web sites we advise for our visitors.
check below, are some totally unrelated internet websites to ours, having said that, they’re most trustworthy sources that we use
the time to study or check out the content or web sites we have linked to beneath the
Here are several of the internet sites we recommend for our visitors.
Check below, are some completely unrelated internet websites to ours, nonetheless, they are most trustworthy sources that we use.
Check beneath, are some totally unrelated internet sites to ours, nonetheless, they may be most trustworthy sources that we use.
always a massive fan of linking to bloggers that I really like but really don’t get a lot of link like from
we came across a cool website that you could take pleasure in. Take a search if you want
always a big fan of linking to bloggers that I really like but dont get quite a bit of link love from
one of our visitors lately encouraged the following website
Here is a superb Blog You might Uncover Intriguing that we Encourage You
please go to the web-sites we stick to, such as this a single, as it represents our picks through the web
although websites we backlink to below are considerably not connected to ours, we really feel they are in fact worth a go through, so possess a look
Sites of interest we have a link to
C & D
B should be TRUE also. But the best is CD.
CD