Hi,
I am wondering how to identify my application in Oracle's v$session. The specific columns are program and module; I would like to know how to populate either one. I can do it programmatically but I was wondering if there was an automatic method. I am looking at it this way so that I can use a database logon trigger to capture context.
thx,
wes
Identifying an application inside of Oracle
-
Wes
- Posts: 3
- Joined: Thu 18 Nov 2004 19:00
- Location: www.datamatters.com
The PROGRAM column fills automatically by OCI.
You cannot set the MODULE column automatically, but you can use the DBMS_APPLICATION_INFO.SET_MODULE.
This procedure sets the name of the module.
Syntax:
DBMS_APPLICATION_INFO.SET_MODULE (module_name IN VARCHAR2,action_name IN VARCHAR2);
Parameters:
module_name : Name of the module. Names longer than 48 bytes are truncated.
action_name : Name of the action within the current module. If you do not want to specify an action, this value should be NULL. Names longer than 32 bytes are truncated.
For additional information see Oracle documentation 'Supplied PL/SQL Packages and Types Reference'.
You cannot set the MODULE column automatically, but you can use the DBMS_APPLICATION_INFO.SET_MODULE.
This procedure sets the name of the module.
Syntax:
DBMS_APPLICATION_INFO.SET_MODULE (module_name IN VARCHAR2,action_name IN VARCHAR2);
Parameters:
module_name : Name of the module. Names longer than 48 bytes are truncated.
action_name : Name of the action within the current module. If you do not want to specify an action, this value should be NULL. Names longer than 32 bytes are truncated.
For additional information see Oracle documentation 'Supplied PL/SQL Packages and Types Reference'.
-
Guest
-
WarpEnterprises
- Posts: 1
- Joined: Thu 24 Jul 2008 12:58
Using DBMS_APPLICATION_INFO works a while, but (due to session pooling?) there is more than one session in the database, although there is only one connection at a time used in the client. Those other sessions don't have "module" set and after some time the session which was "treated" is gone.
Is there a way around this?
Is there a way around this?