DATAGUARD维护:从库宕机后如何恢复到管理恢复模式-阿里云开发者社区

开发者社区> 数据库> 正文

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,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

其他文章