Dynamic Database connection (e.g. Test, Prod) based on OBIEE Login — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Dynamic Database connection (e.g. Test, Prod) based on OBIEE Login

Received Response
21
Views
7
Comments
user2269466
user2269466 Rank 1 - Community Starter

We have designed an OBIEE RPD where the physical layer is based upon a single Oracle database, however, there are multiple instances (TEST, PROD ...etc) of this database structure.

While we require most users to report against the PROD instance, it is also a requirement to occasionally be able to run the same reports against the TEST database.

While, clearly, it would be possible to temporarily amend the properties of the connection pool in the RPD to point to the TEST database, and then switch it back to PROD afterwards, this would mean that all users' reports would run against TEST while the connection was switched.

Is there a way of defining multiple alternative connection pools in the RPD and for the user id of the logged in user to determine which connection is used (e.g. so that , for example, the majority of users would run reports using a PROD connection, with the exception of a user called Test who would always use the TEST connection)?     We have attempted this by creating two connection pools and by setting differrnt access rights to each connection based on application role.  However, OBIEE always appears to attempt to use the first conection pool for the data connection.  if access is denied to the application role of the logged in user then it does not appear to try to use the 2nd conection pool, but instead fails.

I am beginning to think that the only way to achieve what we need will be  to create two separate instances of OBIEE, one for PROD and one for TEST ?

Answers

  • AkanshAgarwal
    AkanshAgarwal Rank 4 - Community Specialist

    Hi,

    You can try using the value of session variable into the DSN of the connection pool.

    The session variable variable can be assigned different values based on user login.

    You need to have same Username/Password to connect the database.

    Regards,

    Akansh Agarwal

  • user2269466
    user2269466 Rank 1 - Community Starter

    Hi Akansh,

    Great idea, but I can’t get it working.

    Are you sure you are allowed to use Session variables as the DSN in a Connection Pool?

    Cheers,

    Richard

  • AkanshAgarwal
    AkanshAgarwal Rank 4 - Community Specialist

    Hi Richard,

    I haven't tried it at my end. I just entered a session variable in the DSN and checked the consistency.

    Regards,

    Akansh

  • user2269466
    user2269466 Rank 1 - Community Starter

    I just entered  %%%%hjdfkljghewlghwhe;kbjhshbkljsfdg as the DSN, and it still passed a consistency check, so I'm not sure the DSN is parsed.

    But I will try implementing what you have suggested and report back on how I get on.

    Thanks,

       Richard

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    A connection pool can handle the DSN, USER and password (this one is highly inadvisable) as a session variable.  Use VALUEOF(variablename) ...

    Consistency check doesn't actually attempt a connection nor does it do a syntax check for your DSN string.

    Oracle uses variables for the connection pools in it's OBIA offerings

  • cesar.advincula.o
    cesar.advincula.o Rank 6 - Analytics Lead

    Yes you could use the dynamic variables:

    DINAMICO.png

    olap.png

    Kind REgards,

  • RichardChan
    RichardChan Rank 6 - Analytics Lead

    Why can't you run the same report in each environment (OBIEE PROD, OBIEE TEST) ?

    Two users is a good idea with separate DSN connections one to PROD one to UAT

    I'm not sure if this will work but you could declare these as a REQUEST/SESSION variable and have a dropdown prompt on the dashboard that allows the selection of the environment at runtime. You would then use this variable in the connection pool.

    Richard Chan

    Neodata Australia