欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

ORA-04030: out of process memory when trying to allocate 152 bytes (Logminer LCR c,krvtadc)

程序员文章站 2022-06-21 22:00:52
今天使用LogMiner找回误更新的数据时,查询v$logmnr_contents时,遇到了“ORA-04030: out of process memory when trying to allocate 152 bytes (Logminer LCR c,krvtadc)”错误。查了一下My O... ......

  今天使用logminer找回误更新的数据时,查询v$logmnr_contents时,遇到了ora-04030: out of process memory when trying to allocate 152 bytes (logminer lcr c,krvtadc)错误。查了一下my oracle support,发现出现ora-04030错误的原因,特摘录在此。

 

 

   如果指定了committed_data_only选项而且发出了查询,则logminer会在内存中的单个事务中逐步重做所有重做记录, 直到 logminer 找到该事务的提交记录。 因此,可能会耗尽内存,在这种情况下将出现out of memory错误。具体参考下面资料:

 

 

ora-04030: out of process memory when trying to allocate 152 bytes (logminer lcr c,krvtadc)

 

 

applies to:

oracle database - enterprise edition - version 10.2.0.4 to 12.1.0.1 [release 10.2 to 12.1]
information in this document applies to any platform.
this problem can occur on any platform.



symptoms

select against logminer fails with ora-4030 (logminer lcr c,krvtadc).

following query failed:
select username, to_char(timestamp,'hh24:mi:ss'), substr(sql_redo,1,110)
from v$logmnr_contents
where seg_owner='<owner name>'
and seg_name in ('<table name>');

from v$logmnr_contents where
error at line 2:
ora-4030: out of process memory when trying to allocate 56 bytes (logminer lcr c,krvtadc)

cause

according to the documentation in oracle® database utilities:
if the committed_data_only option is specified and you issue a query, logminer stages all redo records within a single transaction in memory until logminer finds the commit record for that transaction. therefore, it is possible to exhaust memory, in which case an "out of memory" error will be returned.

execute dbms_logmnr.add_logfile (logfilename => '<filename>',
options => dbms_logmnr.new);
execute sys.dbms_logmnr.start_logmnr(dictfilename => '<dictionary file>',
options =>dbms_logmnr.committed_data_only);

solution

if this occurs, you must restart logminer without the committed_data_only option specified and reissue the query.

references

                                                  

参考资料:

   select against logminer fails with ora-4030 (logminer lcr c,krvtadc) (文档 id 807080.1)