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