Oracle 参数 DIAGNOSTICS_CONTROL 官方解释,作用,如何配置最优化建议
本站中文解释
参数
DIAGNOSTICS_CONTROL参数控制数据库诊断信息的存储和处理,它决定了数据库内部信息是否被存储到特定的侦测区域,以及侦测区域中存储多少时间,以及如何进行处理。
正确设置Oracle参数
1.可以使用以下命令临时设置DIAGNOSTICS_CONTROL参数:
ALTER SESSION SET DIAGNOSTICS_CONTROL=’VALUE’;
2.可以使用SYSPROC.ADMIN_SET_DIAGNOSIS_CONTROL存储过程设置诊断控制参数:
EXEC SYSPROC.ADMIN_SET_DIAGNOSIS_CONTROL (‘VALUE’);
3.可以使用ALTER SYSTEM 设置诊断控制参数:
ALTER SYSTEM SET DIAGNOSTICS_CONTROL=’VALUE’ SCOPE=SPFILE;
4.可以connect到SYS用户并使用ALTER SYSTEM设置诊断控制参数:
CONNECT SYS/PASSWORD AS SYSDBA;
ALTER SYSTEM SET DIAGNOSTICS_CONTROL=’VALUE’ SCOPE=BOTH;
5.可以使用武德DBCA配置管理器设置诊断控制参数:
DBCA->Database->Configuration->Configuration Parameters->Advanced Performance
参数名称:diagnostics_control
参数值:VALUE
官方英文解释
DIAGNOSTICS_CONTROL enables you to control and monitor the users who perform potentially unsafe database diagnostic operations.
| Property | Description |
|---|---|
|
Parameter type |
String |
|
Syntax |
|
|
Default value |
|
|
Modifiable |
|
|
Modifiable in a PDB |
No |
|
Basic |
No |
|
Oracle RAC |
The same value must be used on all instances. |
When diagnosing Oracle database issues, an Oracle Support Service staff member might instruct you to perform diagnostic operations. Some diagnostic operations are harmless. However, others could have adverse effects if not performed properly with the guidance of an Oracle Support Service staff member. In order to control and monitor who performs such diagnostic operations, Oracle Database 20 introduces the following security controls:
- Potentially unsafe diagnostic operations are internally identified in the database. These operations include setting certain debug events and debug actions with the
ALTERSESSIONorALTERSYSTEMstatement. For example:ALTER SESSION SET EVENTS '1357 trace name context forever, level 2'; ALTER SYSTEM SET EVENTS 'trace[vos]'; - A user can be authorized to perform potentially unsafe diagnostic operations, either by being granted the
ENABLEDIAGNOSTICSsystem privilege, or by being granted theDBArole, or by authenticating asSYSDBA. - The
DIAGNOSTICS_CONTROLinitialization parameter enables you to specify how the database responds when an unauthorized user attempts to perform these diagnostic operations. The possible values are:ERROR: When an unauthorized user attempts to perform a potentially unsafe diagnostic operation, the attempt fails with errorORA-01031: insufficient privileges.WARNING: When an unauthorized user attempts to perform a potentially unsafe diagnostic operation, the attempt succeeds, but a warning is written to the alert log.IGNORE: When an unauthorized user attempts to perform a potentially unsafe diagnostic operation, the attempt succeeds and no error messages or warnings occur. This is the default.
Note:
When altering the DIAGNOSTICS_CONTROL initialization parameter, be aware of the following guidelines:
-
To modify this parameter with the
ALTERSYSTEMcommand, you must be authenticatedASSYSDBA. -
In Oracle RAC environments, it is currently not possible to modify this parameter on remote instances by specifying the
SIDclause in theALTERSYSTEMSETstatement.
Note:
This parameter is available starting with Oracle Database 21c.