Last updated on JANUARY 09, 2009
Applies to:PL/SQL - Version: 10.2.0.1
Information in this document applies to any platform.
Starting 10g database, Oracle enabled warnings during PL/SQL compilation to ensure that your programs more robust and avoid problems at run time. You can turn on checking for certain warning conditions. These conditions are not serious enough to produce an error and keep you from compiling a subprogram.
You can enable warnings by setting the initialization parameter PLSQL_WARNINGS on the session or the system level or by using DBMS_WARNING Package. Warning messages can be issued during compilation of PL/SQL subprograms; anonymous blocks do not produce any warnings.
You can enable and disable entire categories of warnings (ALL, SEVERE, INFORMATIONAL, PERFORMANCE), enable and disable specific message numbers, and make the database treat certain warnings as compilation errors so that those conditions must be corrected.
PL/SQL Warning Categories
PL/SQL warning messages are divided into categories, so that you can suppress or display groups of similar warnings during compilation. The categories are:
SEVERE: Messages for conditions that might cause unexpected behavior or wrong results, such as aliasing problems with parameters.
PERFORMANCE: Messages for conditions that might cause performance problems, such as passing a VARCHAR2 value to a NUMBER column in an INSERT statement.
INFORMATIONAL: Messages for conditions that do not have an effect on performance or correctness, but that you might want to change to make the code more maintainable, such as unreachable code that can never be executed.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms