ORA-01466: 无法读取数据 - 表定义已更改

这个错误发生在闪回查询的时候,也可能发生在闪回表的时候

先说结论:如果删除数据后,对表做了ddl操作(更改列的长度等,但是根据测试,增加一列不会报错),然后想闪回,则报错,不能闪回。

实验如下:

SQL> create table gw(id int,name varchar2(5));


Table created.




SQL> insert into gw values(1,'a');


1 row created.




SQL> commit;


Commit complete.




SQL> select sysdate from dual;


SYSDATE
-------------------
2016-11-09 10:15:06




SQL> delete from gw;


1 row deleted.




SQL> commit;


Commit complete.




SQL> select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss');        


        ID NAME
---------- -----
         1 a




SQL> alter table gw add (sid int);


Table altered.




SQL> select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss');


        ID NAME         SID
---------- ----- ----------
         1 a










SQL> alter table gw modify name varchar2(10);


Table altered.




SQL> select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss');
select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss')
              *
ERROR at line 1:
ORA-01466: 无法读取数据 - 表定义已更改






SQL> alter table gw modify name varchar2(5);                                                      


Table altered.




SQL> select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss');
select * from gw as of timestamp to_timestamp('2016-11-09 10:15:06','yyyy-mm-dd hh24:mi:ss')
              *
ERROR at line 1:
ORA-01466: 无法读取数据 - 表定义已更改

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值