Oracle 参数 STANDBY_DB_PRESERVE_STATES 官方解释,作用,如何配置最优化建议
本站中文解释
_ON_SHUTDOWN
STANDBY_DB_PRESERVE_STATES_ON_SHUTDOWN:指定是否在关闭数据库时保留对应关系的状态。 此参数的有效值可以是TRUE或者FALSE,默认为TRUE。
如果设置为TRUE,那么当关闭实例时,状态将被保留,这样当实例再次启动时,可以继续此前正在处理的操作,状态也不会丢失。
如果设置为FALSE,那么当关闭实例时,无论当时的状态如何,都将全部放弃,不保留对应关系的任何状态,实例重新启动时,所有任务都需要重新处理。
正确设置:
在大多数情况下,建议将STANDBY_DB_PRESERVE_STATES_ON_SHUTDOWN参数设置为TRUE,这样可以帮助在意外或服务宕机时保存任务的状态,以免由于数据库实例的关闭而导致意料之外的操作。
官方英文解释
STANDBY_DB_PRESERVE_STATES
controls whether user sessions, buffers, and other internal states of the instance are retained when a readable physical standby database is converted to a primary database. This parameter is meaningful on a physical standby database that is open in real-time query mode.
Property | Description |
---|---|
Parameter type |
String |
Syntax |
|
Default value |
|
Modifiable |
No |
Modifiable in a PDB |
No |
Basic |
No |
Oracle RAC |
The same value must be used on all instances. |
Values
-
NONE
Nothing is retained. All sessions are disconnected and all buffers are flushed. This is the default value.
-
SESSION
User sessions are retained. When the database is reopened as the primary, the retained sessions resume their operations as if nothing had happened. If the database (or an individual PDB) is not opened in the primary role, the sessions will be terminated.
-
BUFFER
All current buffers are retained. Media recovery buffers are converted to current buffers and retained, if possible. When the database is reopened as the primary, the retained buffers are available for use, which may enable queries to run faster during the first few minutes of operation. If the database (or an individual PDB) is not opened in the primary role, the buffers will be flushed.
-
ALL
This value is equivalent to setting both the
SESSION
andBUFFER
values.
Note:
Sessions that have long running queries or are using database links will not be retained regardless of the setting of this parameter.
See Also:
-
Oracle Data Guard Concepts
and Administration for more information about real-time query mode -
Oracle Data Guard Concepts
and Administration for more information about preserving user sessions and buffers when a standby database is converted to a primary database