Create and manage global variables that you want to apply only to the current
session.
About this task
Session scope variables override the default values of global variables.
The following conditions apply to session scope variables:
- They can be Db2 built-in global
variables or user-defined global variables.
- They are active only for the current session and only when explicitly set.
- Their values may be used in the normal processing of other SQL statements such as DELETE,
INSERT, SELECT, or UPDATE.
Procedure
-
On the DB2 Administration Menu
(ADB2) panel, specify option
P, and press Enter.
Alternatively, issue the OPTIONS primary command on any Db2 Admin Tool panel.
The DB2 Admin Options
(ADB2P) panel is
displayed.
-
Specify option SV, and press Enter.
The
Session
Scope Variables (ADBPPSV)
panel is displayed, as shown in
the following figure:
-
Specify option SV, and press Enter.
The
Session Scope Variables in
schema.table (ADBPPSV1)
panel, as shown in the
following figure.
-
Use line commands to manage the session variables.