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

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[Oracle] OCI Dataguard Creation Failing with DCS-12542:Enabling flashback on Data Guar...

[复制链接]
跳转到指定楼层
楼主
发表于 2025-11-16 17:55:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
现象:
Creating Dataguard via Console for OCI DB System is failing. On the primary DB System, we can see a failed "DG Config service creation" job with error: DCS-12542:Enabling flashback on Data Guard environment failed.

"jobId" : "95661cc5-03bb-4592-8861-b9a73d7ed3e8",
"status" : "Failure",
"message" : "DCS-12542:Enabling flashback on Data Guard environment failed. ",
"percentageProgress" : "66%",
"description" : "DG Config service creation",
"cause" : "*Cause:  Database might not be available to perform the operation.",
"action" : "*Action:  Please verify the database availability before retry. If retry fails, contact Oracle Support Services for assistance."


原因:
Analyzing the DCS Agent log, we can see errors while enabling flashback

alter database flashback on
*
ERROR at line 1:
ORA-04031: unable to allocate 31874944 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","flashback generation buffer")
During the Dataguard creation workflow, we first provision the standby db system. Before starting the duplicate operation, we are trying to enable Flashback Database on the primary and it is failing with ORA-04031. In above case, it could not get a contiguous space of 31874944 bytes in Shared Pool for the purpose of flashback generation buffers.

处理方法:
Below queries can be used to check SGA usage and specifically memory used by top shared pool constituents:

SQL> set lines 180
SQL> col COMPONENT format a30
SQL> select INST_ID,COMPONENT,CURRENT_SIZE/1024/1024,MIN_SIZE/1024/1024,MAX_SIZE/1024/1024,USER_SPECIFIED_SIZE/1024/1024,LAST_OPER_TYPE,LAST_OPER_MODE,LAST_OPER_TIME from GV$MEMORY_DYNAMIC_COMPONENTS;
SQL> select INST_ID,CURRENT_SIZE/1024/1024 from GV$SGA_DYNAMIC_FREE_MEMORY;
SQL> select * from (select INST_ID,NAME,BYTES/1024/1024 from gv$sgastat where POOL = 'shared pool' order by BYTES DESC) where rownum < 20;
Based on above, we can take a call whether a shared pool flush is enough or database instance needs to be restarted. Below can be used to flush the shared pool and try to see if flashback can be turned on:

SQL> alter system flush SHARED_POOL;
SQL> alter database flashback on;
Re-try the dataguard creation process from OCI Console.

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-17 18:31 , Processed in 0.241678 second(s), 21 queries .

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

© 2001-2020

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