Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1037218
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

分类: LINUX

2014-01-30 14:30:43

在做闪回实验时候遇到一个问题,如下,
SQL> select * from hr.employees as of timestamp to_timestamp('2012-09-10 18:40:37','YYYY-MM-DD HH24:MI:SS');
select * from hr.employees as of timestamp to_timestamp('2011-10-10 18:40:37','YYYY-MM-DD HH24:MI:SS')
                 *
ERROR at line 1:
ORA-01466: unable to read data - table definition has changed


大体意思是:我查询的那个点的时候,我的数据库还没创建,2011年的时候,我都不知道Oracle是什么,所有谈不上创建了oracle。解决方式如下:
SQL> select * from hr.employees as of timestamp to_timestamp('2014-01-30 13:40:37','YYYY-MM-DD HH24:MI:SS');




官方解释如下
Solution Description:  
=====================  


This is usually caused when some change has been made to the  
initialisation parameter FIXED_DATE or the system date. It can occur  
under different circumstances.  


1. When doing Date testing and the init.ora parameter FIXED_DATE  
has been set to a future date. When the database is started, then  
that date & time does not change.  


So any objects created will have exactly the same Date & Time  
stamp as the FIXED_DATE.  


Now When you come to run the EXPORT, it checks the SYSDATE  
and the creation dates for the objects.  


You need to modify the TIME in the FIXED_DATE parameter,  
i.e. add 1 hour or few minutes, etc and you will not  
encounter the error ORA-1466 anymore.  


2. The Operating System was reinstalled because of the server crash.  
The system date was not set correctly. The year was set to 2001  
instead of 1997 when they reinstalled Oracle. After some DB activity  
they realized the date was incorrect and reset it to 1997 causing some  
objects to exist with future dates.  


Perform full database export without specifying consistent=y and  
recreate the database.
阅读(5851) | 评论(0) | 转发(0) |
0

上一篇:oracle闪回学习一

下一篇:oracle闪回学习二

给主人留下些什么吧!~~