Business Intelligence – Oracle

Oracle BI EE 10.1.3.3.2 – Updating Session Variables through GO URL

Posted by Venkatakrishnan J on February 28, 2008

Another excellent feature that i had wanted to blog about for sometime was pointed out by Swapan of the BI EE forums today here. If you had gone through my previous blog entry here, i would have shown you how to go about updating the session variables from within Answers. Also, i had blogged about one of the usage of updating session variables yesterday here. Now, if you notice the actual update happens through the SET VARIABLE clause in the prefix of the Answers SQL. But say when you want to integrate BI Answers to an external application using GO URL, you would not be able to use presentation variables. So, we would be needing a capability to update the session variable via some URL parameters. If you are not sure what i mean, lets start with creating a simple session variable called DSN which would be set by an initblock via row-wise initialization.

      

Now, lets go to answers and create a simple report which would just display the session variable using the below formula

CASE WHEN 1=0 THEN “Dimension – Flag”.IGNORE_RATE_FLAG ELSE VALUEOF(NQ_SESSION.DSN) END

      

Now, open another browser and use the below GO URL to see the above report.

http://localhost:9704/analytics/saw.dll?Go&nquser=Administrator&nqpassword=Administrator&Path=/shared/Paint%20Demo/GO%20URL%20-%20Vary%20Session%20Variable/Report&Options=rmf

      

Now, if you notice, the value of the session variable remains constant (ORCL in my case). Now, the question is how do we make this value change by passing values through the GO URL. In order to do that, go to {OracleBIData}web and open the instanceconfig.xml using a text editor. Between the ServerInstance tags enter the below set of tags

 <Auth>
<UserIdPassword enabled=”true”>
<ParamList>
<Param name=”NQ_SESSION.DSN” source=”url” nameInSource=”DSN”/>
</ParamList>
</UserIdPassword>
</Auth>

Generally the Auth tag is used for SSO impersonation. But in this case, we are adding one more set of tags UserIdPassword which tell the BI Server that one is using normal authentication. Also, the Param name tag accepts the name of the actual Session variable (NQ_SESSION.DSN in our case). Source=”url” tells the BI Server that we are passing the value to this variable via URL and the name of the parameter would be DSN.

Save the file after entering the above. Restart presentation services. Now, use the below GO URL

http://localhost:9704/analytics/saw.dll?Go&nquser=Administrator&nqpassword=Administrator&Path=/shared/Paint%20Demo/GO%20URL%20-%20Vary%20Session%20Variable/Report&Options=rmf&DSN=Test

Again, what we are doing in the GO URL is we are assigning Test as the value to the DSN variable which in turn assigns it to the DSN session variable. Now, you should see that the report value would have changed.

      

A very important feature and is not documented.

About these ads

11 Responses to “Oracle BI EE 10.1.3.3.2 – Updating Session Variables through GO URL”

  1. Wordster said

    Can’t believe this is not documented. BIG thanks for this.

  2. Özgür said

    Hi,

    How can we use non-ascii characters as parameters in go url? We try to pass turkish letters in our parameters but they are not parsed correctly in our target report (just empty boxes instead of our letters) and the target report is not filtered correctly. We tried to change locale mappings and have charset=iso-8859-9 on the top of our pages as encoding, but that did not help, either. Normally, the characters are displayed just perfect but if we use them in go url, they are not parsed correctly.

    Any comment on this?

  3. Meiyappan said

    Once the tags are added in config file, unable to restart the services.
    Any comments?

    • San said

      Do not just copy paste the code into instanceconfig.xml. The double quotes are being treated as special charectars. I changed them and the services started fine

  4. vin said

    Thanks Venkat for this article it was helpful.
    Is there a way as to how we could pass the values of the current user and password, instead of admin?
    Pls let me know.

  5. loy said

    cannot restart presentation services once instanceconfig is edited

  6. Meenakshi said

    I am trying to dynamicaaly create uRL that points to a PDF file. The PDF file name needs to be constructed using a session variable. eg. when manager of store 1000 logs on to dashoard then the link should point towards Store_1000.pdf and so on.

    Can you let know how I cna do this thru GO URL functionality, if at all.
    Thanks
    Meenakshi

  7. SHANKAR said

    hi nice article..
    can you please tell me how we can set the log level in the dashboard by using presentation variable?

  8. Ranjini said

    Hi,

    This auth tag works well in the local, the same tag put in server where SSO is enabled, is not working. Means its not updating the session variable. Is there any other way to update the session variable when SSO is enabled?

  9. Vaburca said

    Hi,

    this ist very helpful, thanks!
    But I’m facing the following problem. I don’t want to use “&nquser=Administrator&nqpassword=Administrator” in the URL. But this causes that I come to the login page when I type “&DSN=Test” in the URL. Is there a way to prevent this?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 151 other followers

%d bloggers like this: