zoukankan      html  css  js  c++  java
  • 打完补丁后测试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调用时开始同步。

  • 相关阅读:
    【kindeditor】kindeditor的使用
    【kindeditor】KindEditor获取多个textarea文本框的值并判断非空
    jsp文件放在WebRoot下还是WebInfo下
    前端居中模板(常用HTML模板)
    mybatis传入map参数,map中包含list(输入参数)
    mybatis动态sql片段与分页,排序,传参的使用与一对多映射与resultMap使用
    mysql实现随机获取几条数据的方法
    android library projects cannot be launched
    [leetcode]Longest Consecutive Sequence
    看懂下面C++代码才说你理解了C++多态虚函数!
  • 原文地址:https://www.cnblogs.com/perfei/p/6006872.html
Copyright © 2011-2022 走看看