My Oracle Support Banner

Introducing PL/SQL Warning (Doc ID 375260.1)

Last updated on JANUARY 09, 2009

Applies to:

PL/SQL - Version:
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.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.