Wednesday, July 4, 2012

Direct Database Request in OBIEE

This property allows users to execute physical queries directly from Presentation Services.

The users can execute the following Statements in Direct Database Request from Presentation Services directly : 
SELECT
INSERT
DELETE
DROP
UPDATE
PROCEDURE - users can create procedures from Presentation Services.
TRIGGER etc.
How to use this Property ?
[The below steps are written with the assumption of all the privileges are set to the user. If you stuck in any of the following steps, see the Necessary Privileges section in the same post.]

Step 1 : In Answers, Click on Create Direct Request under Direct Database Request.
Step 2 : In Connection Pool Section, write the correct connection pool name.
            [You can get the connection pool name from Administration Tool. Read More].
            In SQL Statement Section, write the SQL.
            Then click on Validate SQL and Retrieve Columns button.          
            There you can see the column list in Result Section.

Then click on Results Tab to see the Results.
Necessary Privileges :
Necessary Privileges, a user should have to use the direct Database Request are as follows :
  • Edit Direct Database Requests
  • Execute Direct Database Requests
Edit Direct Database Requests
If the user does not have Direct Database Request  privileges, then the Direct Database Request section will not be showed in Answers for such user.
To set the Direct Database Request privilege to any user follow the below steps :
Step 1 : Go to Settings > Administration

Step 2 : In Oracle BI Presentation Services Administration window, then locate Manage Privileges  and click           on it.

Step 3 : In the Privilege Administration window, go to Answers section, locate Edit Direct Database Requests, then click on the link.

Step 4 : In Change Privilege Permissions window,  Choose the user to which you want to grant permission, then click on Add.

Step 5 : Now Log in as a user to which you just granted permission and check that Direct Database Request section will be appear for that user in Answers.
Execute Direct Database Requests
In the Privilege Administration window (to open Privilege Administration window,just refer the above steps), go to Answers section, locate Execute Direct Database Requests and grant the this privilege to the desired user.


And one more thing you should do is, go to Administration Tool, grant the Execute Direct Database Requests permission to that user.
To grant Execute Direct Database Requests permission in Administration Tool, follow the below steps.
1. Open Administration Tool, Go to Manage > Security
2. Select the user/ group from left pane of Security Manager window.
3. Double click on the user/ group name.
4. Click on Permission,.
5. In User/Group Permissions window, go to Execute Direct Database Request and select Allow.
6. Click OK.

Note :  If configured incorrectly, it can expose sensitive data to an unintended audience.

How to get the Connection Pool name ?

Open Administration Tool.


In Physical Layer, Expand the Database, then double click on the Connection Pool.

In Connection Pool Window, you can see the name.