重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1684|回复: 0
打印 上一主题 下一主题

[参考文档] ORA-16255 When Configuring Log Auto Delete on Logical Standby

[复制链接]
跳转到指定楼层
楼主
发表于 2020-6-21 21:48:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2020-6-21 21:50 编辑

ORA-16255 When Configuring Log Auto Delete on Logical Standby



ORA-16255 When Configuring Log Auto Delete on Logical Standby (文档 ID 2581213.1)



                               
登录/注册后可看大图

In this Document


Applies to:  Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.
SymptomsConfiguring Log Auto Delete on Logical Standby fails with ORA-16255
SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('LOG_AUTO_DELETE', 'TRUE');
BEGIN DBMS_LOGSTDBY.APPLY_SET('LOG_AUTO_DELETE', 'TRUE'); END;*
ERROR at line 1:
ORA-16255: Log Auto Delete conflicts with another LogMiner session
ORA-06512: at "SYS.DBMS_LOGSTDBY", line 96
ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 771
ORA-06512: at "SYS.DBMS_INTERNAL_LOGSTDBY", line 1778
ORA-06512: at "SYS.DBMS_LOGSTDBY", line 77
ORA-06512: at line 1


CauseSince error complains about another LogMiner session, check for active logminer sessions:
SQL> select SESSION_ID,SESSION_NAME,SESSION_STATE from v$logmnr_session;

SESSION_ID  SESSION_NAME        SESSION_STATE
----------  ------------------  -------------
45          Logical_Standby$45  ACTIVE


As per above, there are no other active logminer sessions except the one initiated by currently active logical standby apply. Check for other logminer sessions known to the database:
SQL> select SESSION#,SESSION_NAME from system.logmnr_session$;


SESSION#   SESSION_NAME
--------   ------------------
39         OGG$CAP_NMS1AAX
41         OGG$CAP_NMS1ABX
45         Logical_Standby$45

Here, we can see there are 2 other logminer sessions known to database corresponding to Oracle GoldenGate capture process. Details about the capture process can be checked from view dba_capture
SQL> select CAPTURE_NAME,QUEUE_NAME,STATUS,LOGMINER_ID from dba_capture;


CAPTURE_NAME     QUEUE_NAME     STATUS    LOGMINER_ID
---------------  -------------  --------  -----------
OGG$CAP_NMS1AAX  OGG$Q_NMS1AAX  DISABLED  39
OGG$CAP_NMS1ABX  OGG$Q_NMS1ABX  DISABLED  41


SolutionGoldengate capture is already disabled. So, go ahead and drop the capture:
exec DBMS_CAPTURE_ADM.DROP_CAPTURE(capture_name => 'OGG$CAP_NMS1AAX',drop_unused_rule_sets => true);
exec DBMS_CAPTURE_ADM.DROP_CAPTURE(capture_name => 'OGG$CAP_NMS1ABX',drop_unused_rule_sets => true);

Once capture is dropped, this should delete the corresponding rows from system.logmnr_session$ after which log auto delete can be set for logical standby:
SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('LOG_AUTO_DELETE', 'TRUE');PL/SQL procedure successfully completed.


NOTE: If you are facing ORA-16255 but there is no capture process defined as per dba_capture, the issue could be because of an incorrectly terminated logical standby session (in the past) which might have left entries in system.logmnr_session$ table. In such case, you can identify such entries, delete them manually from system.logmnr_session$  and re-try configuring log auto delete












分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-26 21:32 , Processed in 0.102540 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表