Oracle 11g 新特性 DB_ULTRA_SAFE 参数

参数是Oracle 11g新增的参数。 Oracle 对该参数的解释:

DB_ULTRA_SAFE sets the default values for other parameters that control protection levels.

简单点,DB_ULTRA_SAFE参数整合了DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM, 和 DB_LOST_WRITE_PROTECT三个参数。

DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM这两个参数在上一篇博文中说明过了。

参数DB_BLOCK_CHECKSUM和DB_BLOCK_CHECKING的说明

DB_LOST_WRITE_PROTECT参数只有在dg的时候用到,dg需要介质恢复时,系统会完成丢失的写保护。

DB_LOST_WRITE_PROTECT

Property Description
Parameter type String
Syntax DB_LOST_WRITE_PROTECT = { NONE | TYPICAL | FULL }
Default value NONE
Modifiable ALTER SYSTEM
Basic No
Oracle RAC In Oracle RAC instances, the parameter value is system-wide.

DB_LOST_WRITE_PROTECT enables or disables lost write detection. A data block lost write occurs when an I/O subsystem acknowledges the completion of the block write, while in fact the write did not occur in the persistent storage.

When the parameter is set to TYPICAL on the primary database, the instance logs buffer cache reads for read-write tablespaces in the redo log, which is necessary for detection of lost writes.

When the parameter is set to FULL on the primary database, the instance logs reads for read-only tablespaces as well as read-write tablespaces.

When the parameter is set to TYPICAL or FULL on the standby database or on the primary database during media recovery, the instance performs lost write detection.

When the parameter is set to NONE on either the primary database or the standby database, no lost write detection functionality is enabled.

DB_ULTRA_SAFE参数

DB_ULTRA_SAFE ={ OFF | DATA_ONLY | DATA_AND_INDEX },默认值为OFF。

当DB_ULTRA_SAFE 设置为: 

(1)OFF:

When anyof DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM, or DB_LOST_WRITE_PROTECT areexplicitly set, no changes are made.

--不改变这三个参数的值。

(2)DATA_ONLY:

三个参数会按照如下方式进行修改:

DB_BLOCK_CHECKING will be set to MEDIUM.

DB_LOST_WRITE_PROTECT will be set to TYPICAL.

DB_BLOCK_CHECKSUM will be set to FULL.

(3)DATA_AND_INDEX:

三个参数会按照如下方式进行修改:

DB_BLOCK_CHECKING will be set to FULL.

DB_LOST_WRITE_PROTECT will be set to TYPICAL.

DB_BLOCK_CHECKSUM will be set to FULL.

当前的环境:

SQL>  show parameter db_ultra_safe

NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
db_ultra_safe                        string     OFF

SQL> show parameter db_block_check

NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
db_block_checking                    string     FALSE
db_block_checksum                    string     TYPICAL

SQL> show parameter DB_LOST_WRITE_PROTECT

NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
db_lost_write_protect                string     NONE

更改db_ultra_safe为data_only

SQL> conn / as sysdba
Connected.
SQL>  alter system set db_ultra_safe=data_only scope=spfile;

System altered.

SQL> startup force;
ORACLE instance started.

再来看一下这三个参数的值:

SQL> show parameter db_block_check

NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
db_block_checking                    string     MEDIUM
db_block_checksum                    string     FULL
SQL> show parameter DB_LOST_WRITE_PROTECT

NAME                                 TYPE       VALUE
------------------------------------ ---------- ------------------------------
db_lost_write_protect                string     TYPICAL

参考:https://blog.csdn.net/tianlesoftware/article/details/8275322

猜你喜欢

转载自blog.csdn.net/jolly10/article/details/81475884