I'm an 'accidental' DBA that's also been tasked with PL/SQL development work.
Ours is a small environment; I'm the only DBA plus another developer who is completely new to PL/SQL.
I'm working (development environment) on a basic package and after getting some compilation errors, I discovered the PLSQL_WARNINGS parameter and found it was set to:
NAME TYPE VALUE
-------------- ------ --------------------------------------------------------
plsql_warnings string ERROR:INFORMATIONAL, DISABLE:PERFORMANCE, DISABLE:SEVERE
Not quite what we want, so I ran this in SQL*Plus as SYS:
ALTER SYSTEM SET PLSQL_WARNINGS = 'ENABLE:ALL' SCOPE=BOTH;
which returned:
System SET altered.
To confirm it:
show parameter PLSQL_WARNINGS;
returned:
NAME TYPE VALUE
-------------- ------ ----------
plsql_warnings string ENABLE:ALL
So far, so good. Later that day I was demonstrating this setting to my boss and the settings had reverted back to the previous values.
This was not only awkward, but confusing as well. MOS tells me there is no known bug or other explanation for this behavior. The system is not getting restarted and the developer does not have privileges to change this parameter.
What gives?
You can set the warnings at the system and session level.
When you use show parameter, you'll get the current session settings. Query v$parameter itself to find the system settings:
show parameter plsql_warnings;
/*
NAME TYPE VALUE
-------------- ------ ---------------------------------------------------------
plsql_warnings string DISABLE:INFORMATIONAL, ENABLE:PERFORMANCE, DISABLE:SEVERE
*/
alter session set plsql_warnings = 'enable:all';
show parameter plsql_warnings;
/*
NAME TYPE VALUE
-------------- ------ ----------
plsql_warnings string ENABLE:ALL
*/
select value
from v$parameter
where name = 'plsql_warnings';
/*
VALUE
---------------------------------------------------------
DISABLE:INFORMATIONAL, ENABLE:PERFORMANCE, DISABLE:SEVERE
*/
So you may have a login script that sets this for your sessions.
Check the COMPILE REUSE SETTINGS clause if you want to preserve the warning level you used when compiling a PL/SQL unit. Steven Feuerstein digs into the details of this at
https://stevenfeuersteinonplsql.blogspot.com/2018/09/all-about-plsql-compilation-settings.html