Thank you Nick for the END_SQL hint. It’s something I didn’t know. With END_SQL I can add BO username as a comment at the end of the SQL and in database level DBA can get the sql_id from v$session and using sql_id it’s possible to see the actual sql query from v$sql system view.
But it’s still not 100% I want to achieve. Is it somehow possibe to make it so that when user logs into InfoView the first action is to call DBMS_APPLICATION_INFO.SET_CLIENT_INFO and set username into v$session.client_info and then run queries?
Solution found & case closed.
andresk (BOB member since 2009-05-12)