ORA-01466: unable to read data - table definition has changed

I was testing "TOTAL RECALL" in 11g release 2 and found very interesting thing....
addition of any constraint on a table (e.g Primary Key)  will cause you to be unable to automatically read the historical data.


I am working on 11gr2 and I am able to drop a column for a table which is being tracked in Total Recall.




SQL> select TABLE_NAME,OWNER_NAME from DBA_FLASHBACK_ARCHIVE_TABLES;
TABLE_NAME OWNER_NAME
------------------------------ ------------------------------
T RECALL
Elapsed: 00:00:00.37
SQL> alter table recall.t drop column status;
Table altered.
Elapsed: 00:02:32.61
SQL>

Bug or expected behaviour ?




flashback data archive example of ORA-01466


SQL> create tablespace recall;

Tablespace created.

SQL> select FILE_NAME,BYTES/1024/1024 from dba_data_files where tablespace_name='RECALL';
FILE_NAME BYTES/1024/1024
------------------------------------------------------------ ---------------
+DATA/rac1db/datafile/recall.270.714949291 100

SQL> create user recall identified by recall
default tablespace users
quota unlimited on users
quota 90m on recall; 2 3 4

User created.

SQL> grant connect,resource to recall;
Grant succeeded.
SQL> conn / as sysdba
SQL> create table recall.t as select * from dba_objects;
Table created.

SQL> grant FLASHBACK ARCHIVE ADMINISTER to recall;
Grant succeeded.

SQL> create flashback archive recall tablespace recall retention 1 month;
Flashback archive created.

SQL> grant flashback archive on recall to recall;
Grant succeeded.

SQL> grant flashback archive on recall to recall;
Grant succeeded.
SQL> conn recall/recall

Connected.

SQL> alter table t flashback archive recall;
Table altered.
SQL> alter table t drop column edition_name;
Table altered.

SQL> select distinct status from t as of TIMESTAMP (TIMESTAMP '2010-03-29 09:26:00');

select distinct status from t as of TIMESTAMP (TIMESTAMP '2010-03-29 09:26:00')

*

ERROR at line 1:

ORA-01466: unable to read data - table definition has changed

No comments:

Post a Comment