A global variable can be created with a default value. Each session that uses it will then instantiate a version of that global variable, with the default value and any change in the value is limited in scope to its unit-of-work. If the global variable happens to be used in a trigger, stored procedure, functions or even in a package, the default value is readily available at its initial use. In some cases, there may be a need to change that default value with a new value globally. Unfortunately, once a global variable is statically related to those objects, it cannot be dropped and recreated without having to drop the other related objects first. This may cause long outage to make that simple change.
Why is it useful?
|Who would benefit from this IDEA?||Application programmers|
How should it work?
Can we have a functionality of altering the default value of a global variable which will immediately become available to those objects at their next execution? Rebind should not be a requirement to get the new default value to take effect either.
A DDL statement that looks something like ALTER VARIABLE owner.varname DEFAULT n.
NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "firstname.lastname@example.org" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions