Oracle 参数 IGNORE_SESSION_SET_PARAM_ERRORS 官方解释,作用,如何配置最优化建议
本站中文解释
IGNORE_SESSION_SET_PARAM_ERRORS 是用于决定记录无效参数设置的选项,可以用 true 或者 false 来设置,默认为false。
当设置为false时,如果某参数的值是无效的,Oracle会在当前会话中发出一个警告,同时这个参数的值也不会生效,数据库将使用默认值或者上一个生效的值;
而当设置为true时,即使参数的值无效,Oracle也不会发出警告,参数的值也不会生效,数据库将使用默认值或者上一个生效的值。
正确用法:
ALTER SYSTEM SET IGNORE_SESSION_PARAM_ERRORS=TRUE SCOPE=BOTH;
此命令可以在数据库范围内设置IGNORE_SESSION_PARAM_ERRORS参数,使其设置为true,以便在设置会话参数时忽略无效参数设置而不触发警告。
官方英文解释
IGNORE_SESSION_SET_PARAM_ERRORS
controls whether the database ignores errors when clients attempt to modify session parameter values.
Property | Description |
---|---|
Parameter type |
String |
Syntax |
|
Default value |
None |
Modifiable |
|
Modifiable in a PDB |
Yes |
Basic |
No |
Oracle RAC |
Multiple instances should use the same value. |
The IGNORE_SESSION_SET_PARAM_ERRORS
parameter allows you to change the outcome of the following scenario:
- An Oracle database uses PDB lockdown profiles to prevent certain initialization parameters from being modified with the
ALTER
SESSION
statement. - A database client attempts to modify one of those parameters with the
ALTER
SESSION
statement. The client has no knowledge that the parameter is locked down. - The database returns an error to the client.
To prevent the database from returning an error in the preceding scenario, set the value of IGNORE_SESSION_SET_PARAM_ERRORS
to a comma-separated list of locked down initialization parameters. Thereafter, if a client attempts to modify one of those parameters with the ALTER
SESSION
statement, the database will ignore the modification attempt and indicate to the client that the operation was successful.
You can set the IGNORE_SESSION_SET_PARAM_ERRORS
parameter while connected to a specific PDB, or you can apply it to all PDBs by setting it in the CDB root.
Example
The CURSOR_INVALIDATION
and CURSOR_SHARING
parameters are locked down in one of the PDBs in your database. If a client application attempts to modify either of these parameters, you want the database to ignore the request and allow the application to continue running without incurring an error. To achieve this, you can connect to the PDB and set the IGNORE_SESSION_SET_PARAM_ERRORS
parameter. For example:
ALTER SYSTEM SET IGNORE_SESSION_SET_PARAM_ERRORS = CURSOR_INVALIDATION, CURSOR_SHARING;