DATAGUARD维护:从库宕机后如何恢复到管理恢复模式

简介:

DATAGUARD维护:从库宕机后如何恢复到管理恢复模式

----------------------------------------------------
一、sys登陆
实例:
$ sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Wed Nov 3 07:35:34 2010
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
Connected to an idle instance.
-----------------------------------------------------
二、备库启动到管理恢复模式
SQL>startup nomount;
SQL>alter database mount standby database;
SQL>alter database recover managed standby database disconnect from session;

实例:
SQL> startup nomount;
ORACLE instance started.
 
Total System Global Area 8187281408 bytes
Fixed Size                  2097024 bytes
Variable Size            1308622976 bytes
Database Buffers         6861881344 bytes
Redo Buffers               14680064 bytes
SQL> alter database mount standby database;
 
Database altered.
 
SQL> alter database recover managed standby database disconnect from session;
 
Database altered.
 
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

-----------------------------------------------------
三、启动侦听

$ lsnrctl start
 
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 03-NOV-2010 07:36:39
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Starting /home/oracle/database/bin/tnslsnr: please wait...
 
TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
System parameter file is /home/oracle/database/network/admin/listener.ora
Log messages written to /home/oracle/database/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.128.26)(PORT=1521)))
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.128.26)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date                03-NOV-2010 07:36:40
Uptime                    0 days 0 hr. 0 min. 2 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /home/oracle/database/network/admin/listener.ora
Listener Log File         /home/oracle/database/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.128.26)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "standby" has 1 instance(s).
  Instance "standby", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

-----------------------------------------------------
四、查看侦听状态
$ lsnrctl status
 
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 03-NOV-2010 07:43:07
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.128.26)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date                03-NOV-2010 07:36:40
Uptime                    0 days 0 hr. 6 min. 28 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /home/oracle/database/network/admin/listener.ora
Listener Log File         /home/oracle/database/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.128.26)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "standby" has 2 instance(s).
  Instance "standby", status UNKNOWN, has 1 handler(s) for this service...
  Instance "standby", status READY, has 1 handler(s) for this service...
Service "standby_XPT" has 1 instance(s).
  Instance "standby", status READY, has 1 handler(s) for this service...
The command completed successfully
 



本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/414338,如需转载请自行联系原作者

相关文章
|
运维
简单记录一次ADG备库同步故障
这是一套11g的老库,主库3节点,备库1节点。项目上于昨天晚上做某测试扩容了表空间,在其他位置新建了9个数据文件,在备库无法创建这个非标准位置的datafile,从而导致同步中断。
329 0
|
SQL Oracle 关系型数据库
PostgreSQL pg_rewind,时间线修复,脑裂修复,flashback - 从库开启读写后,回退为只读从库。异步主从发生角色切换后,主库rewind为新主库的从库
PostgreSQL pg_rewind,时间线修复,脑裂修复,flashback - 从库开启读写后,回退为只读从库。异步主从发生角色切换后,主库rewind为新主库的从库
1880 1
一主两从的环境,如果主库挂了,如何选举一个从库作为主库?
一主两从的环境,如果主库挂了,如何选举一个从库作为主库? 如图: 如果M挂了,怎么从S1和S2中选举一个从库作为主库? 传统复制的解决方法 (1)查看从库状态: S1:show slave status; S2:show slave status; root@l...
911 0
|
SQL 监控 关系型数据库
|
数据安全/隐私保护