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实现
    有序链表--Java实现
    双向链表--Java实现
    表达式求值--Java实现
    【Mac + Appium】之运行报错:[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
    【Mac + ATX基于uiautomator2】使用weditor时,报错:requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
    【Mac系统 + Python + Django】之开发一个发布会系统【Django模型(三)】
    【转】【Mac系统】之ADB命令总结
  • 原文地址:https://www.cnblogs.com/lottu/p/4902424.html
Copyright © 2011-2022 走看看