Ispirer Website Ispirer Capabilities - Oracle Migration Free Trial

Oracle - Return Application Name

To return the application name for the current session, you can use the following query in Oracle:

SELECT program 
FROM v$session 
WHERE audsid=userenv('sessionid');

V$SESSION - system view that contains information for each database session.
AUDSID - column the containing auditing session ID.
USERENV('SESSIONID') - returns the auditing session identifier.


app_name VARCHAR2(48);
SELECT program INTO app_name 
FROM v$session 
WHERE audsid=userenv('sessionid');
dbms_output.put_line('You use the program '||app_name);

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.