BusinessObjects Board

How to Pass BOUSER to Application Context in Oracle

We are using Oracle’s Virtual Private Database(VPD) feature to restrict data. We have a security table that hold the list of countries that user is authorised to see the data. There is a function to return the predicate for country and a policy to apply the function to the fact tables. Function has a Application conext to set the username. Can someone help me on how to pass the username to the application conext. This will be very useful.

Thanks
Dhaya


dhayanithij (BOB member since 2007-06-26)

When a user connects to oracle database, a record is inserted into many SYS user tables…

To get the user name you can use SYS_CONTEXT or V_$SESSION view.

To get the user with what universe connected to database, you can use the following:

SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER')
  FROM DUAL;

This will give you the user name or you can use the above query to send the user name to APPLICATION context.

Hope that helps.


BO_Chief :us: (BOB member since 2004-06-06)

Many thanks for your response. Much Appreciated…

I am afraid V$SESSION or SYS_CONTEXT doesnt meet my requirements. BO Universe connect to oracle with a common user account hence SYS_CONNECT always return the same user account irrespective of bo user. There are about 3000+ BO users and it is not possible to have oracle account for each user. There should be some way through which BO should pass the user name to the database ( in the connection parameters)

Thanks in advance…


dhayanithij (BOB member since 2007-06-26)

Hi.
I dont know if i have undestood your problem.
But maybe this post will help you:


Good luck!


Jaimepe :es: (BOB member since 2006-12-10)