• ORACLE 11G 配置DG 报ORA-10458、ORA-01152、ORA-01110


    操作系统:

    Oracle Linux Server release 5.7

    数据库版本:

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

    主:yoon 备:yoondg

    备库:

    SQL> alter database open read only;

    alter database open read only
    *

    ERROR at line 1:

    ORA-10458: standby database requires recovery
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/opt/oracle/oradata/yoon/system01.dbf'

    查看备库:

    SQL>select switchover_status from v$database;

    SWITCHOVER_STATUS
    --------------------
    TO PRIMARY

    查看主库:

    SQL>select switchover_status from v$database;

    SWITCHOVER_STATUS
    --------------------
    NOT ALLOWED

    查看主库参数:

    SQL> show parameter log_archive_dest_2;

    NAME TYPE
    ------------------------------------ ---------------------------------
    VALUE
    ------------------------------
    log_archive_dest_2 string
    service=yoon async valid_for=(
    online_logfiles,primary_role)
    db_unique_name=yoon
    log_archive_dest_20 string

    蓝色地方设置错误:

    SQL>alter system set log_archive_dest_2='servce=yoondg async valid_for=(online_logfiles,primary_role) db_unique_name=yoondg';

    修改完再次查看:

    SQL>select switchover_status from v$database;

    SWITCHOVER_STATUS
    --------------------
    TO STANDBY

    查看备库:

    SQL>show parameter log_archive_dest_2;

    NAME TYPE
    ------------------------------------ ---------------------------------
    VALUE
    ------------------------------
    log_archive_dest_2 string
    service=yoondg async valid_for=(
    online_logfiles,primary_role)
    db_unique_name=yoondg
    log_archive_dest_20 string

    依旧蓝色地方设置错误:

    SQL>alter system set log_archive_dest_2='service=yoon async valid_for=(online_logfies,primary_role) db_unique_name=yoon';

    重启备库:

    SQL>shutdown immediate;

    SQL>startup nomount;

    SQL>alter database mount standby database;

    SQL>alter database open read only;

    OK,问题解决.

    配置ORACLE-DG的时候一定要认真、仔细,造成的报错往往都是由于小错误引起的,报错的时候不要着急,仔细分析alterSID.log和trace文件.

  • 相关阅读:
    [BZOJ4876][ZJOI2017]线段树
    [FJOI2016]建筑师(斯特林数)
    WC2018伪题解
    [BZOJ3514]CodeChef MARCH14 GERALD07加强版(LCT+主席树)
    [BZOJ2594][WC2006]水管局长加强版(LCT+Kruskal)
    [洛谷3796]【模板】AC自动机(加强版)
    [洛谷3808]【模板】AC自动机(简单版)
    [BZOJ3261]最大异或和
    [BZOJ3439]Kpm的MC密码
    [POI2006]Periods of Words
  • 原文地址:https://www.cnblogs.com/hankyoon/p/5174451.html
Copyright © 2020-2023  润新知