实力恢复可以细分为instance recovery和crash recovery。
crash recovery的产生:
如果数据库异常关闭,数据库就没机会修改V$THREAD.STATUS状态了。因此,数据库在MOUNT状态通过检查这个状态,就可以判断使句库是否需要进行crash recover。(仅限于单INSTANCE)
单INSTANCE环境:
SQL> select status from v$thread;
STATUS
------
OPEN
------
OPEN
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1073741824 bytes
Fixed Size 2089368 bytes
Variable Size 373296744 bytes
Database Buffers 687865856 bytes
Redo Buffers 10489856 bytes
Database mounted.
SQL> select status from v$thread;
Fixed Size 2089368 bytes
Variable Size 373296744 bytes
Database Buffers 687865856 bytes
Redo Buffers 10489856 bytes
Database mounted.
SQL> select status from v$thread;
STATUS
------
OPEN
------
OPEN
如果是RAC环境,结果却不同。(原因还未知)
SQL> SELECT status FROM V$THREAD;
STATUS
------
OPEN
OPEN
------
OPEN
OPEN
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 184549376 bytes
Fixed Size 2019448 bytes
Variable Size 146804616 bytes
Database Buffers 33554432 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> SELECT status FROM V$THREAD;
Fixed Size 2019448 bytes
Variable Size 146804616 bytes
Database Buffers 33554432 bytes
Redo Buffers 2170880 bytes
Database mounted.
SQL> SELECT status FROM V$THREAD;
STATUS
------
CLOSED
OPEN
------
CLOSED
OPEN
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26655292/viewspace-745037/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26655292/viewspace-745037/