Oracle DBMS_WARNING_INTERNAL
Version 12.2.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
Purpose Internal support package for PL/SQL Warnings and the DBMS_WARNING package
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
 
SHOW_WARNING_SETTING
Undocumented ... and obviously not intended for DBAs and developers 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
Built-in Functions
Built-in Packages
DBMS_WARNING
PL/SQL Warnings
What's New In 12cR1
What's New In 12cR2

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved