• 打完补丁后测试db_link对SCN的影响


    环境:11.2.0.4.0 升 11.2.0.4.8 后测试

    背景:oracle 的db_link会导致实例间SCN同步,SCN增长速度过快则会产生错误;

    方案:oracle官方推荐升级版本,但升级之后该问题依然存在。

    新创建orcl11g库
    -------------------------------------------------------
    SQL> alter user scott identified by tiger account unlock;
    SQL> grant create synonym to scott;
    SQL> grant create public database link,create database link to scott;


    [oracle@red12 dbs]$ export ORACLE_SID=orcl11g
    [oracle@red12 dbs]$ sqlplus scott/tiger

    create public database link red12 connect to scott identified by tiger using '(DESCRIPTION =
                    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.201.12)(PORT = 1521))
                    (CONNECT_DATA =
                        (SERVER = DEDICATED)
                        (SERVICE_NAME = hyzf)
                    )
            )';

    hyzf 库SCN
    ------------------------------------
    [oracle@red12 scripts]$ export ORACLE_SID=hyzf1
    [oracle@red12 scripts]$ sqlplus / as sysdba

    SQL>
    SQL> @SCNCHECK.txt;
    --------------------------------------------------------------
    ScnHealthCheck
    --------------------------------------------------------------
    Current Date: 2016/10/28 03:53:44
    Current SCN:  5118400
    SCN Headroom: 10722.16
    Version:      11.2.0.4.0
    --------------------------------------------------------------
    Result: A - SCN Headroom is good
    Apply the latest recommended patches
    based on your maintenance schedule
    For further information review MOS document id 1393363.1
    --------------------------------------------------------------
    SQL>


    新建库SCN
    ---------------------------------
    [oracle@red12 dbs]$ export ORACLE_SID=orcl11g
    SQL> @SCNCHECK.txt;
    --------------------------------------------------------------
    ScnHealthCheck
    --------------------------------------------------------------
    Current Date: 2016/10/28 03:53:00
    Current SCN:  972801
    SCN Headroom: 10722.16
    Version:      11.2.0.4.0
    --------------------------------------------------------------
    Result: A - SCN Headroom is good
    Apply the latest recommended patches
    based on your maintenance schedule
    For further information review MOS document id 1393363.1
    --------------------------------------------------------------

    等待一段时间再次查看,没有什么变化
    SQL> /
    --------------------------------------------------------------
    ScnHealthCheck
    --------------------------------------------------------------
    Current Date: 2016/10/28 03:55:15
    Current SCN:  973120
    SCN Headroom: 10722.16
    Version:      11.2.0.4.0
    --------------------------------------------------------------
    Result: A - SCN Headroom is good
    Apply the latest recommended patches
    based on your maintenance schedule
    For further information review MOS document id 1393363.1
    --------------------------------------------------------------


    调用db_link后立即查看
    -----------------------------------------------

    SQL> select * from emp@red12;

    [oracle@red12 scripts]$ sqlplus / as sysdba

    SQL> @SCNCHECK.txt;
    --------------------------------------------------------------
    ScnHealthCheck
    --------------------------------------------------------------
    Current Date: 2016/10/28 03:55:53
    Current SCN:  5118552
    SCN Headroom: 10722.16
    Version:      11.2.0.4.0
    --------------------------------------------------------------
    Result: A - SCN Headroom is good
    Apply the latest recommended patches
    based on your maintenance schedule
    For further information review MOS document id 1393363.1
    --------------------------------------------------------------

    总结:11.2.0.4 升 11.2.0.4.8之后,db_link对SCN同步的影响并没有消除;只创建db_link而不使用,则库之间的SCN不会同步;SCN从db_link调用时开始同步。

  • 相关阅读:
    一次性能测试的面试问题
    一次APP测试的感悟
    《程序员跳槽全攻略》读书笔记
    如果有人让你推荐编程技术书,请叫他看这个列表
    上班的一天
    马士兵Java视频教程 —— 学习顺序
    月薪3万的技术网站资源收集
    给32岁的自己一些答案
    《Vuser虚拟用户开发》读书笔记
    shell脚本异常:/bin/sh^M:bad interpreter: No such file or directory
  • 原文地址:https://www.cnblogs.com/perfei/p/6006872.html
Copyright © 2020-2023  润新知