ORACLE 9i flashback 報ORA-01466: 無法讀資料 - 表定義已更改

paulyibinyi發表於2009-03-10

SQL> drop table test;

表已丟棄。


SQL> create table test (id number);

表已建立。

SQL>
SQL> insert into test values(100);

已建立 1 行。

SQL> commit;

提交完成。

SQL> select dbms_flashback.get_system_change_number scn from dual;

       SCN
----------
   2919310

SQL> update test set id=200;

已更新 1 行。

SQL> update test set id=300;

已更新 1 行。

SQL> update test set id=400;

已更新 1 行。

SQL> update test set id=500;

已更新 1 行。

SQL> commit;

提交完成。

SQL> select id from test;

        ID
----------
       500

SQL> select dbms_flashback.get_system_change_number scn from dual;

       SCN
----------
   2919335

SQL> select id from test as of scn 2919310;
select id from test as of scn 2919310
               *
ERROR 位於第 1 行:
ORA-01466: 無法讀資料 - 表定義已更改


SQL> select id from test as of scn 2919310
  2  ;
select id from test as of scn 2919310
               *
ERROR 位於第 1 行:
ORA-01466: 無法讀資料 - 表定義已更改


SQL>

 

這個是因為

在create表後,等5分鐘之後再進行相應的scn查詢,del操作,因為9i只支援dml的flashback,create等的ddl不支援,你閃回到的scn有可能dml和ddl在5分鐘內,所以導致出現ora-01466錯誤。
而我這次測試確實在表定義之後馬上測試的。

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-566516/,如需轉載,請註明出處,否則將追究法律責任。

相關文章