首页 > 数据库 > Oracle > dbms_warning的使用
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_warn.htm#i1001622
http://forums.oracle.com/forums/thread.jspa?threadID=625283
[@more@]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:
Security Model
Note that for all the following interfaces, if value of the scope parameter is SYSTEM, then the user must have ALTER SYSTEM privilege.
Table 117-1 DBMS_WARNING Package Subprograms
| Subprogram | Description |
|---|---|
Modifies the current | |
Modifies the current | |
Returns the category name, given the message number | |
Returns the specific warning category in the session | |
Returns the specific warning number in the session | |
Returns the entire warning string for the current session | |
Replaces previous settings with the new value |
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.
Syntax
DBMS_WARNING.ADD_WARNING_SETTING_CAT ( warning_category IN VARCHAR2, warning_value IN VARCHAR2, scope IN VARCAHR2);
Parameters
Table 117-2 ADD_WARNING_SETTING_CAT Procedure Parameters
| Parameter | Description |
|---|---|
| Name of the category. Allowed values are |
| Value for the category. Allowed values are |
| Specifies if the changes are being performed in the session context or the system context. Allowed values are |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/450962/viewspace-1028267/ ,如需转载,请注明出处,否则将追究法律责任。