Oracle DBMS_WARNING_INTERNAL Built-In Package
Versions 10.1 - 19.3

Security Advisory
This package might appear to be a supporting package for DBMS_WARNING but there is no observable dependency between them. We suspect this package is most likely used by a tool such as Enterprise Manager to obtain information warning setting information with respect to a single object.
 
Recommended Security Rules

 NEVER
  • Grant EXECUTE on this package to any user
 WITH GREAT CARE
  • N/A
 CAUTIONS
  • N/A
 
How Oracle Works
We do not have any specific information indicating that processes or procedures make use of this package. There package does not appear to have any associated risks but it is important to remember that it is undocumented and unsupported so should not be used for an application it is best, following Oracle's lead, to not grant access to this package to any user.
 
DBMS_WARNING_INTERNAL Package Information
AUTHID CURRENT_USER
Dependencies
ALL_WARNING_SETTINGS DBA_WARNING_SETTINGS WARNING_SETTINGS$
CDB_WARNING_SETTINGS USER_WARNING_SETTINGS  
Documented No
First Available 10.1
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtplsw.plb
Subprograms
 
 
SHOW_WARNING_SETTING
Returns the warning settings for a PL./SQL object dbms_warning_internal(objno IN NUMBER)
RETURN PIPELINED warning_setting_coll;
conn uwclass/uwclass@pdbdev

ALTER SESSION SET PLSQL_WARNINGS='ENABLE:ALL';

CREATE OR REPLACE PROCEDURE dead_code AUTHID DEFINER AS
 x NUMBER := 10;
BEGIN
  IF x = 10 THEN
    x := 20;
  ELSE
    x := 100;
  END IF;
END dead_code;
/

SP2-0804: Procedure created with compilation warnings

SELECT plsql_warnings
FROM all_plsql_object_settings
WHERE name = 'DEAD_CODE';

conn sys@pdbdev as sysdba

SQL> SELECT COUNT(*)
  2  FROM dba_warning_settings;

 COUNT(*)
----------
      663

SQL> set linesize 121

SQL> SELECT owner, object_id, object_type
  2  FROM dba_warning_settings
  3  WHERE object_name = 'DEAD_CODE';

OWNER   OBJECT_ID OBJECT_TYPE
------ ---------- -----------
UWCLASS     75140 PROCEDURE

SQL> SELECT dbms_warning_internal.show_warning_settings(75140)
  2  FROM dual;

DBMS_WARNING_INTERNAL.SHOW_WARNING_SETTINGS(71895)(OBJ_NO, WARNING, SETTING, PROPERTY)
--------------------------------------------------------------------------------------
SYS_PLSQL_9DEB8363_32_1(SYS_PLSQL_9DEB8363_9_1(75140, -4, 1, 1))


SQL> SELECT * FROM TABLE(dbms_warning_internal.show_warning_settings(75140));

 OBJ_NO    WARNING SETTING PROPERTY
---------- ------- ------- --------
     75140      -4       1        1

desc dba_warning_settings

SQL> SELECT *
  2  FROM dba_warning_settings
  3  WHERE object_id = 75140;

OWNER   OBJECT_NAME  OBJECT_ID  OBJECT_TYPE  WARNING SETTING
-------- ----------- ---------- ------------ ------- -------
UWCLASS DEAD_CODE    75140      PROCEDURE    ALL     ENABLE

Related Topics
DBMS_WARNING
PL/SQL Object Settings
PL/SQL Warnings