SQL>
SQL>
SQL> set serveroutput on
SQL> declare
2 myModule varchar2(48);
3 begin
4 select b.module into myModule from v$session b where b.audsid = sys_context('userenv','sessionid');
5 dbms_output.put_line('Current Program is ' || myModule);
6 end;
7 /
Current Program is SQL*Plus
PL/SQL procedure successfully completed.
SQL>
SQL>
|