关键词不能为空

当前您在: 主页 > 英语 >

oacle ORA-12034 Materialized View Log Younger Than Last Refr

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-03-03 06:30
tags:

-

2021年3月3日发(作者:垂死)




Diagnosing ORA-12034 Materialized View Log Younger Than Last Refresh (


文档


ID 204127.1)



转到底部




In this Document



Purpose



Troubleshooting Steps



References




APPLIES TO:


Oracle Database - Enterprise Edition - Version 9.2.0.1 and later


Information in this document applies to any platform.



PURPOSE


This


troubleshooting


guide


is


intended


to


introduce


the


reader


to


the


reasons


and


ORA-12034


can


be


raised


when


refreshing


a


materialized


view,


and


to


present


the


most


common


causes


of


the


error.


It


also


gives


solutions


for


many


of


these


problems


and some troubleshooting queries.


TROUBLESHOOTING STEPS


1. Error Definition and Description




Error Definition




Oracle 8i and below: ORA-12034:



Oracle 9i and above: ORA-12034:




Cause: The materialized view log was younger than the last refresh.



Action: A complete refresh is required before the next fast refresh.


Note: A complete refresh can be done using the command:


execute dbms_h('



Like


the


error


text


above


indicates,


ORA-12034


is


a


timing


issue


that


occurs


when


performing


a


fast


refresh


of


a


materialized


view. To troubleshoot it, it's important to get some background information regarding the refresh mechanism.




When a materialized view log is created for a master table, and a materialized view has been created with the REFRESH


FAST option, the following timestamps will be used when validating log age.




At the materialized view site:




- Information about the last refresh time for each materialized view. The last refresh time is recorded as the timestamp


when the last refresh completed successfully.




At the master table site:


- Information about the last refresh time for every materialized view using a materialized view log on that site.




The timestamps at the master site are used for two purposes:




-


To


maintain


information


concerning


which


rows


are


needed


to


fast


refresh


each


individual


registered


materialized


view.



- To maintain information concerning which rows can be purged from the materialized view log.




When a fast refresh starts, the last refresh timestamp from the materialized view site for the refreshing materialized


view


is


compared


to


the


oldest


timestamp


of


ANY


materialized


view


using


the


same


materialized


view


log


as


the


one


currently


being


refreshed.


If


the


oldest


timestamp


is


newer


than


the


materialized


view


site


timestamp,


ORA-12034


is


raised.


By


doing


this


it


is


ensured


that


all


changed


rows


since


the


last


refresh


will


be


refreshed,


and


if


this


can't


be


ensured,


a


complete


refresh is forced. There's no exception to this behavior, and violating this main rule will result ORA-12034.






2. Potential Causes of ORA-12034





There are a number of potential reasons that the last refresh time for a materialized view at the materialized view site


can be older than the oldest timestamp at the master site. These are described below.



2.1 Dropping / recreating the materialized view log on the master table.




If a materialized view was created at time T1 and materialized view log was created at time T2, we can't ensure that all


changes made between T1 and T2 will be in the materialized view after fast refresh. Therefore complete refresh is


mandatory.





2.2 Creating the materialized view before the materialized view log.




The explanation here is the same as in Section 2.1.





2.3 The previous refresh for the materialized view did not complete successfully.




When a refresh starts, the last refresh time of the materialized view is set to '01-JAN-1950'. This guarantees that if


the refresh fails for any reason, then an ORA-12034 error will be signaled and a complete refresh will be forced. When


the refresh succeeds, this date is updated to the proper time. If it doesn't get updated because of some failure during


the refresh, the next time the refresh runs, '01-JAN-1950' is used to validate the log age.





2.4 Creating a materialized view takes longer than the time it takes all other materialized views currently using the


materialized view log to refresh.





If


there


are


other


materialized


views


using


the


materialized


view


log


on


the


master


table,


and


all


of


these


other


materialized


views start their refreshes AFTER the new materialized view creation has started but complete their refreshes BEFORE the


new


materialized


view


creation


has


completed,


then


fast


refreshes


will


fail


with


ORA-12034.


Materialized


view


registration


is based on the starting time of the creation, but as the last step of the operation. If that start time is older than


the


oldest


timestamp


currently


registered,


the


new


materialized


view


will


not


be


registered.


A


complete


refresh


is


required


to register the materialized view, but it may not avoid the ORA-12034 error the next time a fast refresh is attempted.




There are three ways to resolve this problem:




- Stop the refresh of at least one other materialized view that is using the materialized view log before



creating the new one.



- In production system the previous option might not be possible. For this situation, a temporary materialized view can


be created which uses the same log. If this temporary materialized view is not refreshed while the new materialized view


is created, the new materialized view creation can complete successfully.



- Use deployment templates to create the materialized view environment at materialized view sites. This problem will not


occur if deployment templates are used. See the Advanced Replication documentation for information about deployment


templates.





2.5 Certain DDL changes to the master table have been performed.




DDL changes that modify the master table data are not recorded in the materialized view log (truncate, alter partition,


drop partition, truncate partition, exchange partition, etc).




Truncation


of


a


materialized


view


master


table


should


be


made


specifying


the


'purge


materialized


view


log'


clause


to


force


a complete refresh, otherwise the data will be inconsistent between the master table and the materialized view. However,


specifying this clause will cause the ORA-12034 error if an attempt is made to fast refresh before complete refreshing.


This is Oracle's way of forcing the complete refresh. See


Note 179469.1



for a more detailed description of this.




Note that for Partition


Maintenance


Operations (PMOPS) such


as alter


partition,


drop


partition,


truncate partition,


etc,

-


-


-


-


-


-


-


-



本文更新与2021-03-03 06:30,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/697269.html

oacle ORA-12034 Materialized View Log Younger Than Last Refr的相关文章

  • 余华爱情经典语录,余华爱情句子

    余华的经典语录——余华《第七天》40、我不怕死,一点都不怕,只怕再也不能看见你——余华《第七天》4可是我再也没遇到一个像福贵这样令我难忘的人了,对自己的经历如此清楚,

    语文
  • 心情低落的图片压抑,心情低落的图片发朋友圈

    心情压抑的图片(心太累没人理解的说说带图片)1、有时候很想找个人倾诉一下,却又不知从何说起,最终是什么也不说,只想快点睡过去,告诉自己,明天就好了。有时候,突然会觉得

    语文
  • 经典古训100句图片大全,古训名言警句

    古代经典励志名言100句译:好的药物味苦但对治病有利;忠言劝诫的话听起来不顺耳却对人的行为有利。3良言一句三冬暖,恶语伤人六月寒。喷泉的高度不会超过它的源头;一个人的事

    语文
  • 关于青春奋斗的名人名言鲁迅,关于青年奋斗的名言鲁迅

    鲁迅名言名句大全励志1、世上本没有路,走的人多了自然便成了路。下面是我整理的鲁迅先生的名言名句大全,希望对你有所帮助!当生存时,还是将遭践踏,将遭删刈,直至于死亡而

    语文
  • 三国群英单机版手游礼包码,三国群英手机单机版攻略

    三国群英传7五神兽洞有什么用那是多一个武将技能。青龙飞升召唤出东方的守护兽,神兽之一的青龙。玄武怒流召唤出北方的守护兽,神兽之一的玄武。白虎傲啸召唤出西方的守护兽,

    语文
  • 不收费的情感挽回专家电话,情感挽回免费咨询

    免费的情感挽回机构(揭秘情感挽回机构骗局)1、牛牛(化名)向上海市公安局金山分局报案,称自己为了挽回与女友的感情,被一家名为“实花教育咨询”的情感咨询机构诈骗4万余元。

    语文