zoukankan      html  css  js  c++  java
  • RAC+单实例场景下 DG主备切换,报ORA-01577

    SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
    ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
    *
    ERROR at line 1:

    ORA-01577: cannot add log file '/u01/app/oracle/oradata/orcl/group_1.257.1010584013' - file already part of database

    主库下:

    select  member from v$logfile;

    MEMBER
    --------------------------------------------------------------------------------
    +DATA/orcl/onlinelog/group_1.257.1010584013
    +FRA/orcl/onlinelog/group_1.257.1010584013

    log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/'

    ADG端是本地文件系统,导致同文件同目录只有一份。

    select  member from v$logfile;

    MEMBER
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/orcl/group_1.257.1010584013
    /u01/app/oracle/oradata/orcl/group_1.257.1010584013

    主库制定了闪回区,备库没有指定。

    1、第一种方式:SQL> ALTER DATABASE DROP LOGFILE MEMBER '/u01/app/oracle/oradata/orcl/group_1.257.1010584013' ;

    2、第二种方式 :SQL>ALTER DATABASE RENAME FILE '/u01/app/oracle/oradata/orcl/group_1.257.1010584013'  TO '/u01/fast_recovery_area/group_1.257.1010584013' ;

    将主库的*.log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/'改为

    *.log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/orcl/','+FRA/orcl/onlinelog/','/u01/fast_recovery_area/'

    然后:ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

  • 相关阅读:
    纪念这一天,我找到了实习工作
    在编程的道路上坚定地走下去
    今天是1024程序员节
    趣谈函数调用与返回值
    为期3个月的实训结束了,有感而发
    学习编程时遇到难点怎么办?
    今天学习了安卓中的UI线程
    Java程序员要掌握的常用快捷键
    我是一个注重基础的人
    我也有自己的小家啦
  • 原文地址:https://www.cnblogs.com/elontian/p/11012737.html
Copyright © 2011-2022 走看看