Demonstrates DBMS_APPLICATION_INFO and its two procedures.
SQL> DECLARE
2
3 my_env VARCHAR2(1);
4
5 BEGIN
6
7
8 DBMS_APPLICATION_INFO.READ_CLIENT_INFO(my_env);
9
10
11 DBMS_OUTPUT.PUT_LINE('Read CLIENT_INFO value ['||my_env||'].');
12
13
14 DBMS_OUTPUT.PUT_LINE('Set CLIENT_INFO to [1].');
15
16
17 DBMS_APPLICATION_INFO.SET_CLIENT_INFO('1');
18
19
20 DBMS_APPLICATION_INFO.READ_CLIENT_INFO(my_env);
21
22
23 DBMS_OUTPUT.PUT_LINE('Read CLIENT_INFO value ['||my_env||'].');
24
25 END;
26 /
Read CLIENT_INFO value [].
Set CLIENT_INFO to [1].
Read CLIENT_INFO value [1].
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category