Oracle 参数 PLSQL_WARNINGS 官方解释,作用,如何配置最优化建议
本站中文解释
PLSQL_WARNINGS是控制PL/SQL代码中一些编译和运行时警告信息的参数,可以通过设置这个参数来区分警告来显示警告,禁止警告,只留下注意警告,或者关闭警告消息这几种情况。
正确的设置方式:
1. 进入SQL*Plus环境,在提示符后输入“ alter system set PLSQL_WARNINGS=enable;”命令,使警告消息正确显示;
2. 也可以通过SQL命令“create or replace procedure procedure_name is begin null; end;”来设置警告消息显示,在这种情况下,执行过程中会有警告信息出现;
3. 如果想要只保留注意警告,可以使用“alter system set PLSQL_WARNINGS=defer;”命令;
4. 最后,如果需要完全禁用警告消息,可以使用“alter system set PLSQL_WARNINGS=off;”命令,这会导致所有的警告消息在会话期间被完全忽略。
官方英文解释
PLSQL_WARNINGS
enables or disables the reporting of warning messages by the PL/SQL compiler, and specifies which warning messages to show as errors.
Property | Description |
---|---|
Parameter type | String |
Syntax |
|
Syntax | value_clause::=
|
Default value |
|
Modifiable |
|
Modifiable in a PDB | Yes |
Basic | No |
Examples | PLSQL_WARNINGS = 'ENABLE:SEVERE', 'DISABLE:INFORMATIONAL';PLSQL_WARNINGS = 'DISABLE:ALL';PLSQL_WARNINGS = 'DISABLE:5000', 'ENABLE:5001', 'ERROR:5002';PLSQL_WARNINGS = 'ENABLE:(5000,5001,5002)', 'DISABLE:(6000,6001)'; |
value_clause
Multiple value clauses may be specified, enclosed in quotes and separated by commas. Each value clause is composed of a qualifier, a colon (:
), and a modifier.
Qualifier values:
ENABLE
Enable a specific warning or a set of warnings
DISABLE
Disable a specific warning or a set of warnings
ERROR
Treat a specific warning or a set of warnings as errors
Modifier values:
ALL
Apply the qualifier to all warning messages
SEVERE
Apply the qualifier to only those warning messages in the
SEVERE
categoryINFORMATIONAL
Apply the qualifier to only those warning messages in the
INFORMATIONAL
categoryPERFORMANCE
Apply the qualifier to only those warning messages in the
PERFORMANCE
category
See Also:
Oracle Database PL/SQL
Language Reference for more information about this parameter
编辑:广州明生医药有限公司
标签:消息,命令,可以通过,可以使用,正确