[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.