[20170515]引數fast_start_mttr_target

lfree發表於2017-05-15

[20170515]fast_start_mttr_target容易混淆的地方.txt

--//自己很少關注這個引數.但是確實非常容易混淆.

1.環境:
SYS@book> @ &r/ver1
PORT_STRING         VERSION    BANNER
------------------- ---------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

--//如果不設定,也是預設設定.
$ strings spfilebook.ora | grep -i fast_start_mttr_target

SYS@book> show spparameter fast_start_mttr_targ
SID      NAME                          TYPE    VALUE
-------- ----------------------------- ------- -------
*        fast_start_mttr_target        integer

SYS@book> show parameter fast_start_mttr_targ
NAME                   TYPE    VALUE
---------------------- ------- ------
fast_start_mttr_target integer 0

--//alert*.log:
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set


SYS@book> select WRITES_AUTOTUNE from v$instance_recovery ;
WRITES_AUTOTUNE
---------------
             52
--//實際上這個時候是開啟自動調整.
--//如果你設定0,自動關閉這個功能.

2.設定fast_start_mttr_target=0;

SYS@book> alter system set fast_start_mttr_target=0;
System altered.

SYS@book> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.


SYS@book> startup
ORACLE instance started.
Total System Global Area  634732544 bytes
Fixed Size                  2255792 bytes
Variable Size             197133392 bytes
Database Buffers          427819008 bytes
Redo Buffers                7524352 bytes
Database mounted.
Database opened.

--//alert*.log:

Mon May 15 10:40:15 2017
ARC0 started with pid=22, OS id=34420
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thread 1 opened at log sequence 745
  Current log# 3 seq# 745 mem# 0: /mnt/ramdisk/book/redo03.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
--//提示一樣,但是現在是關閉的.

SYS@book> show parameter fast_start_mttr_targ
NAME                   TYPE    VALUE
---------------------- ------- -----
fast_start_mttr_target integer 0

SYS@book> show spparameter fast_start_mttr_targ
SID      NAME                   TYPE    VALUE
-------- ---------------------- ------- ------
*        fast_start_mttr_target integer 0

--//你等很久觀察,這是WRITES_AUTOTUNE一直是0.
SYS@book> select WRITES_AUTOTUNE from v$instance_recovery ;
WRITES_AUTOTUNE
---------------
              0

3.設定fast_start_mttr_target=200:
SYS@book> alter system set fast_start_mttr_target=200;
System altered.

--//重啟:
SYS@book> show parameter fast_start_mttr_targ
NAME                   TYPE    VALUE
---------------------- ------- ------
fast_start_mttr_target integer 200

SYS@book> show spparameter fast_start_mttr_targ
SID      NAME                   TYPE    VALUE
-------- ---------------------- ------- -----
*        fast_start_mttr_target integer 200

--//alert沒有mttr的相關顯示,表示已經MTTR advisory is enabled.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2139066/,如需轉載,請註明出處,否則將追究法律責任。

相關文章