SYS.SYS_HUB dblink DML Redirectiond

本文介绍了Oracle19C中的DMLRedirection新特性,包括如何在备库启用该功能,以及SYS.SYS_HUB数据库链接的作用。同时提到,如果数据库配置仅包含只读实例,可以删除SYS.SYS_HUB链接而不会产生影响。
摘要由CSDN通过智能技术生成

oracle 19C 新特性 DML Redirection
Oracle 19C Active Data Guard新特性之DML重定向(DML Redirection)
通过在系统级或会话级设置ADG_REDIRECT_DML参数,启用DML重定向功能

设置方式(备库)
-- 会话级别
ALTER SESSION ENABLE ADG_REDIRECT_DML;
-- 系统级别
alter system ENABLE ADG_REDIRECT_DML;
1.
2.
3.
4.
使用
ALTER SESSION ENABLE ADG_REDIRECT_DML;
-- 然后就可以像主库一样执行DML语句
insert into table_name values(col1,col2);
......
commit;

1.
2.
3.
4.
5.
注意事项
ADG 中 DML 重定向新特性可能带来备库的安全管控问题,否则可能会破环主库的一致性。

在oracle 18c的时候,可以通过设置隐含参数实现相同的功能

alter session set "_enable_proxy_adg_redirect"=true;
-- 跟踪该会话
alter session set events '10046 trace name context forever ,level 12';
1.
2.
3.
这个DML操作实际是通过内部DB Link来重定向到主库执行的,然后通过日志再同步到备库。
 

GOAL

 What is the use of database Link SYS.SYS_HUB and can it be deleted?

SOLUTION

This db link is used to route dml operations issued on read only instance to a read write instance where it can actually be executed.
It could be used in both cases(CDB/PDB and standalone database). The db link was defined to work in any setup in which read write and
read only instances are present.

If you are not using RW (Read Write (RW) instance is an instance in which read and write operations can be done. Select/Insert/Update/Delete)
/ RO (Read Only instance only allows read operations. Select) instance configuration, You can delete the db link with no side effects.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值