zoukankan      html  css  js  c++  java
  • 用rman恢复备库;遇到备库起不来一个案例 ORA-01152:ORA-01110

    • 数据从主库恢复到备库;打开备库发现出现异常

    SQL> alter database open;

    alter database open

    *

    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: '/u01/app/oradata/orcl/system01.dbf'

    • 查看告警日志 用tail -200 alert_orcl.log 查看

    Standby crash recovery need archive log for thread 1 sequence 27156 to continue.

    Please verify that primary database is transporting redo logs to the standby database.

    Wait timeout: thread 1 sequence 27156

    从告警展示等待超时;就是在主库传归档日志给备库。可以找到原因是出在tnsname.ora;或者是否是参数配置Ok;这两个参数

    *.fal_client=

    *.fal_server=

    • 自己仔细核对一遍;并tnsping 每个网路服务名。再一次启动

    SQL> shutdown immediate;

    ORA-01109: database not open

    Database dismounted.

    ORACLE instance shut down.

    SQL> create spfile from pfile='/u01/app/oracle/dbs/pfile_orcl.ora';

    File created.

    SQL> startup

    ORACLE instance started.

    Total System Global Area 1603411968 bytes

    Fixed Size                  2213776 bytes

    Variable Size            1023412336 bytes

    Database Buffers          570425344 bytes

    Redo Buffers                7360512 bytes

    Database mounted.

    ORA-10458: standby database requires recovery

    ORA-01152: file 1 was not restored from a sufficiently old backup

    ORA-01110: data file 1: '/u01/app/oradata/orcl/system01.dbf'

    还是出现一样的症状。 原因是一样吗?看alert日志吧

    Media Recovery Waiting for thread 1 sequence 157

    ARC3: Archival started

    ARC0: STARTING ARCH PROCESSES COMPLETE

    Error 1017 received logging on to the standby

    ------------------------------------------------------------

    Check that the primary and standby are using a password file

    and remote_login_passwordfile is set to SHARED or EXCLUSIVE,

    and that the SYS password is same in the password files.

          returning error ORA-16191

    ------------------------------------------------------------

    FAL[client, ARC2]: Error 16191 connecting to orcl_120 for fetching gap sequence

    Errors in file /u01/app/diag/rdbms/ora11g/orcl/trace/orcl_arc2_25914.trc:

    ORA-16191: Primary log shipping client not logged on standby

    日志出现

    Check that the primary and standby are using a password file and remote_login_passwordfile is set to SHARED or EXCLUSIVE,

    and that the SYS password is same in the password files. returning error ORA-16191。

    这个应该是跟密码文件有关。

    • 在主库重建下密码文件;再传到备库

    orapwd file=orapworcl password=oracle entries=10;

    scp orapworcl oracle@oracle2:/u01/app/oracle/dbs/

    • 再一次启动;看看还会出现什么问题

    SQL> alter database open;

    Database altered.

  • 相关阅读:
    Java 的垃圾回收机制
    Java 变参函数的实现
    对已知有限集合中缺失或重复元素的查找
    Java 旋转数组查找旋转点和任意元素(元素可重复)
    第三章 磁盘分区
    第二章 一切都是对象
    发布 AutoRssReceiver Console 机器人! 兼讲: .Net 中的 Attribute (特性)
    .Net/C#/VB/TSQL/Java 实现: 将天文数字转换成中文大写 (2000 年前的思路,打劫的,一点儿技术含量都没有)
    .Net/C#/VB/TSQL/Java/Script 实现: 将天文数字转换成中文大写 (2000 年前的思路,打劫的,一点儿技术含量都没有)
    利用"委托"实现类的对象实例按"多字段嵌套"排序
  • 原文地址:https://www.cnblogs.com/lottu/p/4902424.html
Copyright © 2011-2022 走看看