Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how can a PL/SQL identify itself?
DBMS_APPLICATION_INFO provides SET_CLIENT_INFO and SET_ACTION
procedures for you to "register" your package as already stated above.
However, you don't need to query anything to get the information back -
use SYS_CONTEXT( 'userenv', 'client_info' ) or SYS_CONTEXT( 'userenv',
'action' ) e.g.
SQL> exec dbms_application_info.set_client_info( 'SOME_PACKAGE' );
PL/SQL procedure successfully completed.
SQL> select sys_context('userenv','client_info') from dual;
SYS_CONTEXT('USERENV','CLIENT_INFO')
Regards
Adrian
Received on Fri Jan 21 2005 - 03:20:23 CST