ADG不同步可能情况

1、主库存在数据库级别的登录触发器
登录数据库会触发insert数据到表中
ADG备库属于只读数据库,因此会导致主库无法登录到备库


检查方法:
--查看sys用户下触发器

set linesize 500 pagesize 500
col owner format a5
col TRIGGER_NAME format a50
col TRIGGER_TYPE format a30
col BASE_OBJECT_TYPE format a12
col status format a12
select owner,TRIGGER_NAME,TRIGGER_TYPE,BASE_OBJECT_TYPE,STATUS from dba_triggers where owner='SYS';


处理方法:
1、检查触发器隐含参数情况

col name format a20
col description format a20
col VALUE format a6
col isdefault format a8
col ismodified format a8
col isadjusted format a8
SELECT   i.ksppinm name,  
           i.ksppdesc description,  
           CV.ksppstvl VALUE,  
           CV.ksppstdf isdefault,  
           DECODE (BITAND (CV.ksppstvf, 7),  
                   1, 'MODIFIED',  
                   4, 'SYSTEM_MOD',  
                   'FALSE')  
              ismodified,  
           DECODE (BITAND (CV.ksppstvf, 2), 2, 'TRUE', 'FALSE') isadjusted  
    FROM   sys.x$ksppi i, sys.x$ksppcv CV  
   WHERE       i.inst_id = USERENV ('Instance')  
           AND CV.inst_id = USERENV ('Instance')  
           AND i.indx = CV.indx  
           AND i.ksppinm LIKE '/_%' ESCAPE '/'  
           and i.ksppinm='_system_trig_enabled'
ORDER BY   REPLACE (i.ksppinm, '_', '');


2、禁用隐含参数

alter system set "_system_trig_enabled"=false;

--启用
--alter system set "_system_trig_enabled"=true;

 

posted @   Eddie小陈  阅读(477)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示