当前位置:  数据库>oracle

DataGuard在做Switchover切换时遇到ORA-01093等问题总结

    来源: 互联网  发布时间:2017-06-04

    本文导语:  SQL> select switchover_status from v$database; SWITCHOVER_STATUS--------------------SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY*ERROR at line 1:ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected此错误...

SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

此错误的因为主库中有活动的会话造成的,解决的办法为:
1.杀掉活动会话,重新执行该命令
2.在该命令后面加上with session shutdown即


SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
NOT ALLOWED
SQL> alter database commit to switchover to primary;
alter database commit to switchover to primary
*
ERROR at line 1:
ORA-16139: media recovery required
或者如下:--RECOVERY NEEDED
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
RECOVERY NEEDED
###############
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
TO PRIMARY
SQL> alter database commit to switchover to primary;
Database altered.

Sun Apr 20 20:15:35 2014
Media Recovery Log /u01/app/Oracle/prod/arch/1_62_844894247.dbf
Media Recovery Waiting for thread 1 sequence 63
Sun Apr 20 20:15:46 2014
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[6]: Assigned to RFS process 19968
RFS[6]: Identified database type as 'physical standby'
RFS[6]: Archived Log: '/u01/app/oracle/prod/arch/1_63_844894247.dbf'
Sun Apr 20 20:15:50 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_63_844894247.dbf

Sun Apr 20 20:15:50 2014

Sun Apr 20 20:15:50 2014
---最后应用到的SCN
Sun Apr 20 20:15:50 2014

Resetting standby activation ID 257246883 (0xf5546a3)
Sun Apr 20 20:15:51 2014
----
Sun Apr 20 20:16:21 2014
alter database recover managed standby database cancel
Sun Apr 20 20:16:21 2014
ORA-16136 signalled during: alter database recover managed standby database cancel...

相关参考:

Oracle Data Guard 重要配置参数

基于同一主机配置 Oracle 11g Data Guard

探索Oracle之11g DataGuard

Oracle Data Guard (RAC+DG) 归档删除策略及脚本

Oracle Data Guard 的角色转换

Oracle Data Guard的日志FAL gap问题

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 处理方法


    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • ORACLE DATAGUARD中手工处理日志v$archive_GAP的方法
  • Oracle Dataguard备库失败与主库响应测试
  • Linux下Oracle10_Dataguard配置与应用
  • Oracle 11g Dataguard参数详解


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,