【故障】EXP-00056: ORACLE error 1466 encountered

时间:2016-04-30 02:12:09   收藏:0   阅读:925

EXP-00056: ORACLE error 1466 encountered

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

EXP-00056: ORACLE error 1466 encountered
ORA-01466: unable to read data - table definition has changed
. . exporting table TO32_T0
. . exporting table TO32_T0_DETAIL 314 rows exported
. . exporting table TO32_T0_JYKY
. . exporting table TO32_T0_TMP 155 rows exported
. . exporting table TO32_T0_ZLZY
. . exporting table TO32_T1
. . exporting table TO32_T1_DETAIL
EXP-00056: ORACLE error 1466 encountered
ORA-01466: unable to read data - table definition has changed
. . exporting table TO32_T1_JYKY
. . exporting table TO32_T1_TMP
EXP-00056: ORACLE error 1466 encountered
ORA-01466: unable to read data - table definition has changed
01466, 00000, "unable to read data - table definition has changed"
SQL*Plus: Release 11.2.0.4.0 Production on Thu Mar 24 05:39:19 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> !oerr ora 1466
01466, 00000, "unable to read data - table definition has changed"
// *Cause: Query parsed after tbl (or index) change, and executed
// w/old snapshot
// *Action: commit (or rollback) transaction, and re-execute
  1. 在版本10g中SMON_SCN_TIME每6秒钟被更新一次(In Oracle Database 10g, smon_scn_time is updated every 6 seconds hence that is the minimum time that the flashback query time needs to be behind the timestamp of the first change to the table.)
  2. 在版本9.2中SMON_SCN_TIME每5分钟被更新一次(In Oracle Database 9.2, smon_scn_time is updated every 5 minutes hence the required delay between the flashback time and table properties change is at least 5 minutes.)
delete from smon_scn_time
where thread = 0
and time_mp = (select min(time_mp) from smon_scn_time where thread = 0)
[oracle@datar ~]$ ps -ef|grep smon|grep -v grep
oracle 3922 1 0 Mar23 ? 00:00:09 ora_smon_ora11g
[oracle@datar ~]$ ps -ef|grep smon|grep -v grep
oracle 3922 1 0 Mar23 ? 00:00:09 ora_smon_ora11g
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
ORA11G
SQL> oradebug setospid 3922
Oracle pid: 13, Unix process pid: 3922, image: oracle@datar (SMON)
SQL> oradebug event 10500 trace name context forever,level 10 : 10046 trace name context forever,level 12;
Statement processed.
SQL> oradebug tracefile_name;
/home/oracle/product/diag/rdbms/ora11g/ora11g/trace/ora11g_smon_3922.trc
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
PARSING IN CURSOR #140375269773744 len=141 dep=1 uid=0 oct=2 lid=0 tim=1458763578296250 hv=973751600 ad=‘a9899260‘ sqlid=‘9wncfacx0nj9h‘
insert into smon_scn_time (thread, time_mp, time_dp, scn, scn_wrp, scn_bas, num_mappings, tim_scn_map) values (0, :1, :2, :3, :4, :5, :6, :7)
END OF STMT
PARSE #140375269773744:c=999,e=847,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1458763578296045
select smontabv.cnt,
???????? smontab.time_mp,
???????? smontab.scn,
???????? smontab.num_mappings,
???????? smontab.tim_scn_map,
???????? smontab.orig_thread
from smon_scn_time smontab,
??????? (select max(scn) scnmax,
????????????????? count(*) + sum(NVL2(TIM_SCN_MAP, NUM_MAPPINGS, 0)) cnt
????????????????? from smon_scn_time
??????? where thread = 0) smontabv
where smontab.scn = smontabv.scnmax
?? and thread = 0
insert into smon_scn_time (thread,
??????????????????????????????????????? time_mp,
??????????????????????????????????????? time_dp,
??????????????????????????????????????? scn,
??????????????????????????????????????? scn_wrp,
??????????????????????????????????????? scn_bas,
??????????????????????????????????????? num_mappings,
??????????????????????????????????????? tim_scn_map)
????????????????????????????? values (0, :1, :2, :3, :4, :5, :6, :7)

bubuko.com,布布扣

?

update smon_scn_time
????? set orig_thread = 0,
?????????? time_mp = :1,
?????????? time_dp = :2,
?????????? scn = :3,
?????????? scn_wrp = :4,
?????????? scn_bas = :5,
?????????? num_mappings = :6,
?????????? tim_scn_map = :7
where thread = 0
?? and scn = (select min(scn) from smon_scn_time where thread = 0)
delete from smon_scn_time
??????? where thread = 0
?????????? and scn = (select min(scn) from smon_scn_time where thread = 0)
SQL> alter system set events ‘12500 trace name context forever,level 10’;
System altered.
SQL> drop index smon_scn_time_bak_tim_idx;
索引已删除。
SQL> drop index smon_scn_time_bak_scn__idx;
索引已删除。
SQL> create unique index smon_scn_time_bak_tim_idx on smon_scn_time_bak(time_mp);
索引已创建。
SQL> create unique index smon_scn_time_bak_scn_idx on smon_scn_time_bak(scn);
索引已创建。
SQL> analyze table smon_scn_time_bak validate structure cascade;
表已分析。
--set oracle trace event 12500
SQL> alter system set events ‘12500 trace name context forever,level 10’;
--delete records in smon_scn_time
SQL> delete from smon_scn_time;
SQL> alter system set events ‘12500 trace name context forever off’;
SQL> commit;
SQL> shutdown immediate;
SQL> startup;

?

?

原文:http://askerain.iteye.com/blog/2294590

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!