今天突然被要求启动一个instance的standby,接到request之后脑子里迅速搜索相关知识,结果只有一些零散的命令片断...当时记得再劳的知识许久不用也光光啊
还有偶有online document这一法宝~打开10g的Data Guard Concepts and Administration,迅速定位到相关部分,按照步骤:
1. Start and mount the database:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2098693920 bytes
Fixed Size 743200 bytes
Variable Size 520093696 bytes
Database Buffers 1577058304 bytes
Redo Buffers 798720 bytes
ORA-01666: controlfile is for a standby database
2. Start log apply services:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION
*
ERROR at line 1:
ORA-01507: database not mounted
其实第一步就有问题了,重来一遍还是如此,才发现此库乃9i的数据库,命令十有八九不对( ORA-01666错误其实就能说明问题了~)!
哈哈,还好9i的文档偶也有,迅速定位,follow:
1. Connect to the physical standby database instance.
sqlplus "/ as sysdba"
2. Start the Oracle instance at the physical standby database without mounting the database.
SQL> STARTUP NOMOUNT
ORACLE instance started.
Total System Global Area 2098693920 bytes
Fixed Size 743200 bytes
Variable Size 520093696 bytes
Database Buffers 1577058304 bytes
Redo Buffers 798720 bytes
3. Mount the physical standby database.
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
Database altered.
4. Start log apply services.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
5. Monitor recovery process. May refer to V$MANAGED_STANDBY and V$ARCHIVE_DEST_STATUS.
SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS
2 FROM V$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
--------- ------------ ---------- ---------- ---------- ----------
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
RFS RECEIVING 1 281940 1161 1161
MRP0 WAIT_FOR_LOG 1 281941 0 0
最后简单看了下alert log,tail之后看到了以下信息:
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DI
Sun Jan 18 03:08:43 2009
Media Recovery Log /dtlm02/tlm/o01tlm3arch/stdby_arch/O01TLM3281937.arc
Media Recovery Log /dtlm02/tlm/o01tlm3arch/stdby_arch/O01TLM3281938.arc
Media Recovery Log /dtlm02/tlm/o01tlm3arch/stdby_arch/O01TLM3281939.arc
Media Recovery Log /dtlm02/tlm/o01tlm3arch/stdby_arch/O01TLM3281940.arc
Media Recovery Waiting for thread 1 seq# 281941
随后主观臆断为启动成功,通知requestor继续下一步
整个过程被催了一次,主要是由于10g和9i的命令区别阿~~~兄弟们一定要注意了,先搞清楚版本,然后根据版本搞清楚具体命令,被搞过好多次了,一定要吸取教训:)
Stop过程也类似,一定要注意不同版本间具体命令的区别。关于Dataguard,10g和9i的区别好像有很多,有空要好好总结下。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9765498/viewspace-541356/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9765498/viewspace-541356/