PL/SQL Packages and Types Reference 10g Release 1 (10.1) Part Number B10802-01 |
|
|
View PDF |
The DBMS_WARNING
package provides a way to manipulate the behavior of PL/SQL warning messages, in particular by reading and changing the setting of the PLSQL_WARNINGS initialization parameter to control what kinds of warnings are suppressed, displayed, or treated as errors. This package provides the interface to query, modify and delete current system or session settings.
This chapter contains the following topics:
Note that for all the following interfaces, if value of the scope parameter is SYSTEM
, then the user must have ALTER
SYSTEM
privilege.
You can modify the current session's or system's warning settings with the value supplied. The value will be added to the existing parameter setting if the value for the warning_category
or warning_value
has not been set, or override the existing value. The effect of calling this function is same as adding the qualifier (ENABLE
/DISABLE
/ERROR
) on the category specified to the end of the current session or system setting.
DBMS_WARNING.ADD_WARNING_SETTING_CAT ( warning_category IN VARCHAR2, warning_value IN VARCHAR2, scope IN VARCAHR2);
You can modify the current session
or system
warning settings with the value supplied. If the value was already set, you will override the existing value. The effect of calling this function is same as adding the qualifier (ENABLE
/ DISABLE
/ ERROR
) on the category specified to the end of the current session or system setting.
DBMS_WARNING.ADD_WARNING_SETTING_NUM ( warning_number IN NUMBER, warning_value IN VARCHAR2, scope IN VARCAHR2);
This function returns the category name, given the message number.
DBMS_WARNING.GET_CATEGORY ( warning_number IN pls_integer) RETURN VARCHAR2;
Parameter | Description |
---|---|
|
The warning message number. |
This function returns the specific warning category setting for the current session.
DBMS_WARNING.GET_WARNING_SETTING_CAT ( warning_category IN VARCHAR2) RETURN warning_value;
Parameter | Description |
---|---|
|
Name of the category. Allowed values are all valid category names ( |
This function returns the specific warning number setting for the current session.
DBMS_WARNING.GET_WARNING_SETTING_NUM ( warning_number IN NUMBER) RETURN warning_value;
Parameter | Description |
---|---|
|
Warning number. Allowed values are all valid warning numbers. |
This function returns the entire warning string for the current session.
DBMS_WARNING.GET_WARNING_SETTING_STRING RETURN pls_integer;
Use this function when you do not have SELECT
privilege on v$parameter
or v$paramater2
fixed tables, or if you want to parse the warning string yourself and then modify and set the new value using SET_WARNING_SETTING_STRING
.
This procedureS replaces previous settings with the new value. The warning string may contain mix of category and warning numbers using the same syntax as used on the right hand side of '=' when issuing an ALTER
SESSION
or SYSTEM
SET
PLSQL_WARNINGS
command. This will have same effect as ALTER
SESSION
OR ALTER
SYSTEM
command.
DBMS_WARNING.SET_WARNING_SETTING_STRING ( warning_value IN VARCHAR2, scope IN VARCHAR2);