oracle dg断电重启后修复gap

凌晨1点多,金桥wms的一台备库服务器ping不通,机器重启了,具体故障原因还不清楚

重启后数据库没有起来。是因为数据库异常关闭后有一个归档没有过来,有一个gap,修复好了。
SQL> select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORACLE instance started.
Total System Global Area 1.3683E+11 bytes
Fixed Size    2245480 bytes
Variable Size 8321502360 bytes
Database Buffers  1.2831E+11 bytes
Redo Buffers  189480960 bytes
Database mounted.
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: ‘/data6/oracle/oradata/wmsv25/system.dbf’
SQL> select status from v$instance;
STATUS
————
MOUNTED
SQL>
通过在主库执行switch logfile进行修复
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SQL>
primary (10.0.3.50)上手工切换日志:
SQL> alter system switch logfile;
System altered.
SQL>
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: ‘/data6/oracle/oradata/wmsv25/system.dbf’
================alert log==============
alter database open
Beginning standby crash recovery.
Serial Media Recovery started
Managed Standby Recovery starting Real Time Apply
Media Recovery Log /data/oracle/arch/1_18815_856834712.dbf
Media Recovery of Online Log [Thread=1, Seq=18816]
Recovery of Online Redo Log: Thread 1 Group 22 Seq 18816 Reading mem 0
  Mem# 0: /data1/oracle/oradata/wmsv25/stdredo22.log
Thu Nov 13 02:41:00 2014
Standby crash recovery failed to bring standby database to a consistent
point because needed redo hasn’t arrived yet.
MRP: Wait timeout: thread 1 sequence# 18816
Standby crash recovery aborted due to error 16016.
Errors in file /home/oracle/app/diag/rdbms/wmsadg2/wmsv25/trace/wmsv25_ora_33627.trc:
ORA-16016: archived log for thread 1 sequence# 18816 unavailable
Recovery interrupted!
Some recovered datafiles maybe left media fuzzy
Media recovery may continue but open resetlogs may fail
Completed standby crash recovery.
Errors in file /home/oracle/app/diag/rdbms/wmsadg2/wmsv25/trace/wmsv25_ora_33627.trc:
ORA-10458: standby database requires recovery
ORA-01196: file 1 is inconsistent due to a failed media recovery session
ORA-01110: data file 1: ‘/data6/oracle/oradata/wmsv25/system.dbf’
ORA-10458 signalled during: alter database open…
数据库仍然无法正常启动,查看alert日志发现archive gap 18816
备库没有18816这个归档文件
修复归档gap 18816
primary上传输主库日志到备库
[oracle@wmsv25dg checkpoints]$ scp /data/oracle/arch/1_18816_856834712.dbf oracle@10.17.2.1:/data/oracle/arch
备库上手工注册日志
SQL> alter database register logfile ‘/data/oracle/arch/1_18816_856834712.dbf’;
Database altered.
启动数据库
SQL> alter database open;
Database altered.
应用日志同步
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SQL>
SQL> select status from v$instance;
STATUS
————
OPEN
SQL> select open_mode from v$database;
OPEN_MODE
——————–
READ ONLY WITH APPLY
SQL>
启动监听服务
[oracle@wmsv25dg1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 13-NOV-2014 03:07:33
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.17.2.1)(PORT=1522)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@wmsv25dg1 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 13-NOV-2014 03:07:43
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Starting /home/oracle/app/product/11.2.0.3/db_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 11.2.0.3.0 – Production
System parameter file is /home/oracle/app/product/11.2.0.3/db_1/network/admin/listener.ora
Log messages written to /home/oracle/app/diag/tnslsnr/wmsv25dg1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.17.2.1)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.17.2.1)(PORT=1522)))
STATUS of the LISTENER
————————
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date                13-NOV-2014 03:07:43
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/diag/tnslsnr/wmsv25dg1/listener/alert/log.xml
Listening Endpoints Summary…
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.17.2.1)(PORT=1522)))
Services Summary…
Service “wmsv25” has 1 instance(s).
  Instance “wmsv25”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully

共有 0 条评论

Top