Showing posts with label Database Objects. Show all posts
Showing posts with label Database Objects. Show all posts

Oracle Database Resource Manager and OBIEE

When putting together an OBIEE system, one common requirement from clients is to provide an enhanced level of service for particular groups of users. For example, you might want to define a “standard” group for regular OBIEE users, and a “management” group that gets allocated more CPU time, more I/O resources and so on. You might want to limit standard users’ queries to a maximum of one minute run time, whilst allow managerial users’ queries to take as long as they need. You might want to define a set of rules that say, if a standard user’s query is predicated to take longer than a minute, move the query to a lower-priority resource pool so that it doesn’t take up all the available CPU. You might want to make all of these users higher priority than batch jobs, or you might want to restrict standard user queries from running in parallel. All of these are typical “resource management” issues that you might want to take control of.
OBIEE, at the BI Server level. lets you define query limits that either warn or stop users from exceeding certain elapsed query times or number of rows returned. Assuming you define a “standard” group for most OBIEE users, you might want to stop them from displaying reports (requests) that return more than 50,000 rows, whilst you might want to warn them if their query takes over five minutes to run.
Sshot-1
(note that this is different to Discoverer, which used to maintain statistics and warn you if the query was predicted to take over a certain time, rather than warn you if it took over a certain time).
You can also restrict the times of day that users can run queries, which you might do to stop users running queries before 9am, assuming managers come in early and want to get their figures quickly.
Sshot-2
Whilst these are quite handy, you might want to exercise more control over how resources are allocated to these groups, and if you’re using an Oracle database as the back-end database, a feature you might therefore want to use is the Oracle Database Resource Manager. The Oracle Database Resource Manager (or DBRM for short) allows you to define consumer groups and resource plans which can then be used to:
  • Guarantee certain sessions a minimum amount of processing resource regardless of the total load on the system
  • Allocate percentages of CPU time to different users and applications
  • Restrict or limit the degree of parallelism for queries
  • Restrict the total number of active sessions for a particular group
  • Manage runaway sessions, by either stopping them running or switching them to a lower-priority group
  • Prevent the execution of queries predicted to take over a certain amount of time
  • Automatically allocate sessions to particular resource plans depending on attributes of the session
  • Limit the amount of time that a session can be idle, including if it is blocking another session from starting
In an OBIEE context, the way that you would set this up depends on whether users connect using their own Oracle login, or through a shared login. If they use their own Oracle database login, this will be passed through to the Oracle database holding the source data and the resource manager will apply the relevant resource plan, based on which consumer group they belong to.
More likely though is the situation where users access the database through a shared login which works via a connection pool. In this situation, it’s the shared login that is sent through to the Oracle database which will again allocate it to a resource group and apply the resource plan accordingly. DBRM therefore, from a database perspective, has the following three major elements:
  1. Resource Consumer Groups, which are groups of sessions that share the same characteristics and that have resource plan allocated to them
  2. Resource Plans, containers for sets of Resource Plan Directives, and
  3. Resource Plan Directives, which are instructions to Oracle on how to allocate database resources
DBRM resource plan directives are therefore allocated to resource consumer groups, not individual users, with all of this being managed by an Oracle PL/SQL package called DBMS_RESOURCE_MANAGER. So how does this work in practice?
Well, Tim Hall’s website (http://www.oracle-base.com) is usually the place I go to for concise definitions of new Oracle features, and he’s written a series of articles about DBRM since its inception back in Oracle 8i:
There’s also a more general white paper from Oracle entitled “Best Practices for a Data Warehouse on Oracle Database 11g” that mentions Resource Manager in the wider context of an Oracle Data Warehouse, and of course the Oracle Documentation. For the purposes of working through the feature though, it’s probably worth thinking about a scenario where this might come in useful.
In this scenario, we have three main groups of users:
  1. Standard DW users, who we will give a guaranteed 30% of CPU time to, who won’t be able to run queries in parallel, and who won’t be allowed to run queries that are predicted to take more than 5 minutes to run
  2. Advanced DW users, who will be given a guaranteed 50% of CPU, who can use parallel query up to a DOP of 4, but will be bounced down to the Standard DW user group if their queries actually take more than 1 minute
  3. Executives, who will be guaranteed 20% of CPU time and again, won’t have restrictions on what they do
These will become the main “Resource Consumer Groups” as far as DBRM is concerned. Note that for the above groups, the CPU restrictions will only take place when CPU usage reaches 100% (allowing us to ration a scarce resource only when necessary), and CPU resources from groups that aren’t using them will be allocated to those that need them if we’re running under 100% usage. So it’s not too restrictive an approach and one that will only really kick-in when resources are scarce. Note also that the 11g release of DBRM also allows disk I/O to be taken into account, which would allow us to include the amount of disk activity in resource plans when disk I/O becomes the bottleneck (or we could just go and buy an Exadata machine, I guess…)
This will all be set up in a resource plan called “Daytime”, that will only apply during normal working hours (out of hours, users can do what they want).
Sshot-3
Using Oracle 11.1.0.7 on Linux x86, assuming we’ll go with the shared logon approach, the first step is to create the shared logons, one for each of the groups.
CREATE USER standard_dw_user IDENTIFIED BY password
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;

GRANT CONNECT TO standard_dw_user;

CREATE USER advanced_dw_user IDENTIFIED BY password
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;

GRANT CONNECT TO advanced_dw_user;

CREATE USER executives IDENTIFIED BY password
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;

GRANT CONNECT TO executives;
Then I grant “select any table” to the three users (don’t do this at home, kids) so that they can access the SH schema:
GRANT SELECT ANY TABLE TO standard_dw_user;

GRANT SELECT ANY TABLE TO advanced_dw_user;

GRANT SELECT ANY TABLE TO executive;
Now in 11g there’s an option to create a simple resource plan that just allocates consumer groups a share of CPU resources. This is easier to set up than the full resource plan I’ll create later on, and to do this you just issue the following PL/SQL call.
BEGIN
  DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_PLAN(SIMPLE_PLAN => 'DAYTIME',
   CONSUMER_GROUP1 => 'STANDARD_DW_GROUP', GROUP1_PERCENT => 30,
   CONSUMER_GROUP2 => 'ADVANCED_DW_GROUP', GROUP2_PERCENT => 50,
   CONSUMER_GROUP3 => 'EXECUTIVE_DW_GROUP', GROUP3_PERCENT => 20);
END;
/
This has the effect of creating the three consumer groups, and setting up the three directives in the new DAYTIME resource plan.
Next we need to firstly, grant permission for each user to use its respective consumer group, and then set these groups as the users’ default.
BEGIN
  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'standard_dw_user',
    CONSUMER_GROUP => 'standard_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'advanced_dw_user',
    CONSUMER_GROUP => 'advanced_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'executive',
    CONSUMER_GROUP => 'executive_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('standard_dw_user', 'standard_dw_group');

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('advanced_dw_user', 'advanced_dw_group');

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('executive', 'executive_dw_group');

END;
/
Finally we now need to turn on the resource plan.
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = daytime;
Now I can start sessions as these users, and then run the following SELECT statement as a DBA user.
SELECT username, resource_consumer_group
FROM   v$session
WHERE  username in ('EXECUTIVE','STANDARD_DW_USER');

USERNAME                       RESOURCE_CONSUMER_GROUP
------------------------------ --------------------------------
STANDARD_DW_USER               STANDARD_DW_GROUP
EXECUTIVE                      EXECUTIVE_DW_GROUP
which shows that the users have been allocated to the correct group. Now, when CPU usage reaches 100%, resources will be allocated according to this plan, splitting CPU use according to the percentages in the simple resource plan, and allocating spare resources to another plan when a particular group isn’t using up all its allocation.
As I mentioned earlier, you can get cleverer and put in directives to restrict access to parallel query, shift down to a more constrained group if query times go past a certain level, restrict access to I/O and so on if you wish. This is done through what’s called a “complex resource plan” and it’s a bit more complicated to set up.
The first thing you need to do when working with a complex resource plan is to create a “pending area”. According to the manuals, a pending area is “a staging area where you can create a new resource plan, update an existing plan, or delete a plan without affecting currently running applications. When you create a pending area, the database initializes it and then copies existing plans into the pending area so that they can be updated”. We’ll also take the opportunity to delete the previous resource plan, after we set up the pending area.
conn / as sysdba

SET ECHO ON

BEGIN
  DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
  DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
END;
/

BEGIN
     DBMS_RESOURCE_MANAGER.DELETE_PLAN_CASCADE(PLAN=>'DAYTIME');
END;
/
We’ll now set up a new plan, and the three different resource groups;
BEGIN
  DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();

  DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();

  DBMS_RESOURCE_MANAGER.CREATE_PLAN(
   PLAN    => 'DAYTIME_PLAN',
   COMMENT => 'Complex Daytime Plan');

  DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
   CONSUMER_GROUP => 'STANDARD_DW_GROUP',
   COMMENT        => 'Standard DW Users');

  DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
   CONSUMER_GROUP => 'ADVANCED_DW_GROUP',
   COMMENT        => 'Advanced DW Users');

  DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
   CONSUMER_GROUP => 'EXECUTIVE_DW_GROUP',
   COMMENT        => 'Executive DW Users');

END;
/
Now there are a fair few more parameters available for the CREATE_PLAN procedure, mostly concerned with the method by which we allocate resources (“emphasis” or “ratio”), but for now we’ll go with the defaults.
Next we define the plan directives.
BEGIN

  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'STANDARD_DW_GROUP',
   COMMENT                  => 'Standard DW group',
   MGMT_P1                  => 30,
   PARALLEL_DEGREE_LIMIT_P1 => 0,
   SWITCH_TIME              => 300,
   SWITCH_GROUP             => 'CANCEL_SQL',
   SWITCH_ESTIMATE          => TRUE
   );

  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'ADVANCED_DW_GROUP',
   COMMENT                  => 'Advanced DW group',
   MGMT_P1                  => 45,
   PARALLEL_DEGREE_LIMIT_P1 => 4,
   SWITCH_TIME              => 60,
   SWITCH_GROUP             => 'STANDARD_DW_GROUP',
   SWITCH_ESTIMATE          => FALSE
   );

  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'EXECUTIVE_DW_GROUP',
   COMMENT                  => 'Executive DW group',
   MGMT_P1                  => 20
   );

 DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'OTHER_GROUPS',
   COMMENT                  => 'other groups',
   MGMT_P1                  => 5
   );

END;
/
Note how I’ve had to allocate some resource to any users falling outside these groups, in this complex resource plan.
Finally we validate, and then submit, the pending area.
BEGIN
 DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
 DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
END;
/
Then we have to grant permission to our users to use these plan directives, and set them as the user’s default, as we did with the simple plan.
BEGIN
  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'standard_dw_user',
    CONSUMER_GROUP => 'standard_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'advanced_dw_user',
    CONSUMER_GROUP => 'advanced_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP(
    GRANTEE_NAME   => 'executive',
    CONSUMER_GROUP => 'executive_dw_group',
    GRANT_OPTION   => FALSE);

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('standard_dw_user', 'standard_dw_group');

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('advanced_dw_user', 'advanced_dw_group');

  DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('executive', 'executive_dw_group');

END;
/
And finally, turn on the new resource plan.
ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = daytime_plan;
Then we can log in, in separate sessions, as these three users, and check that they’ve been allocated to the correct consumer groups.
SELECT username, resource_consumer_group
FROM   v$session
WHERE  username in ('EXECUTIVE','STANDARD_DW_USER','ADVANCED_DW_USER');

USERNAME                       RESOURCE_CONSUMER_GROUP
------------------------------ --------------------------------
ADVANCED_DW_USER               ADVANCED_DW_GROUP
EXECUTIVE                      EXECUTIVE_DW_GROUP
STANDARD_DW_USER               STANDARD_DW_GROUP
So let’s try and trigger some of the resource management. Now the hard CPU limits will be hard to test, as they only kick on when CPU usage on the machine gets to 100%, and even then when there is no spare capacity in a consumer group that’s not using all it’s allocation, but we should be able to get a “standard DW user” to have their query cancelled if it’s going to take more than five minutes.
I create a copy of the SH schema, insert the contents of the SALES table into itself a couple of times, then write a SELECT statement that aggregates the table using a cartesian join – something that will take ten minutes or so to run.
conn standard_dw_user/password

SELECT sum(amount_sold)
FROM   sh_copy.sales
,      sh_copy.products
,      sh_copy.customers
,      sh_copy.times
,      sh_copy.promotions
,      sh_copy.channels
/

ERROR at line 2:
ORA-00040: active time limit exceeded - call aborted
So the Database Resource Manager has aborted the query, even before it executes, because the predicted time for the query was greater than five minutes.
If we now log in as the advanced DW user, we can see consumer group switching in action.
conn advanced_dw_user/password

select sum(amount_sold)
from   sh_copy.sales
,      sh_copy.products
,      sh_copy.customers
/
Leaving the session running switching back to the SYS user, I can see their consumer group initially being the advanced user group:
SELECT username, resource_consumer_group
FROM   v$session
WHERE  username in ('EXECUTIVE','STANDARD_DW_USER','ADVANCED_DW_USER');

USERNAME                       RESOURCE_CONSUMER_GROUP
------------------------------ --------------------------------
ADVANCED_DW_USER               ADVANCED_DW_GROUP
After a minute though, I check again and see that they have indeed switched down to the lower priority group.
SQL> /

USERNAME                       RESOURCE_CONSUMER_GROUP
------------------------------ --------------------------------
ADVANCED_DW_USER               STANDARD_DW_GROUP
Using this technique you can “manage” power users who write runaway queries, allowing the query to continue but switching them away from taking up all of the system’s resources.
So, wrapping this all up, how to we make use of it with OBIEE. The trick to it is two things; firstly, we need to amend the resource directive to make it work properly with connection pools, otherwise one particular OBIEE user exceeding time limits will push all the other users of that connection pool into this lower-priority consumer group, and secondly we need to define multiple connection pools that make use of each resource group.
Firstly I need to go back and amend the directives to use SWITCH_TIME_IN_CALL rather than SWITCH_TIME (which bounces any new sessions by a user back to the original resource group rather than leaving them in the ones the previous session was switched in to), like this:
BEGIN

 DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
 DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();

 DBMS_RESOURCE_MANAGER.DELETE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'STANDARD_DW_GROUP'
  );

 DBMS_RESOURCE_MANAGER.DELETE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'ADVANCED_DW_GROUP'
  );

 DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'STANDARD_DW_GROUP',
   COMMENT                  => 'Standard DW group',
   MGMT_P1                  => 30,
   PARALLEL_DEGREE_LIMIT_P1 => 0,
   SWITCH_TIME_IN_CALL      => 300,
   SWITCH_GROUP             => 'CANCEL_SQL',
   SWITCH_ESTIMATE          => TRUE
   );

  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (
   PLAN                     => 'DAYTIME_PLAN',
   GROUP_OR_SUBPLAN         => 'ADVANCED_DW_GROUP',
   COMMENT                  => 'Advanced DW group',
   MGMT_P1                  => 45,
   PARALLEL_DEGREE_LIMIT_P1 => 4,
   SWITCH_TIME_IN_CALL      => 60,
   SWITCH_GROUP             => 'STANDARD_DW_GROUP',
   SWITCH_ESTIMATE          => FALSE
   );

  DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
  DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();

END;
/
Now we switch over to the BI Administration tool, and define some standard, advanced and executive users that belong to standard, advanced and executive security groups.
Sshot-4
Now we take copies of the standard connection pool, and name it after each of the consumer groups, deleting the original one.
Sshot-6
Then we edit each connection pool, changing the shared login to correspond to the users we created earlier (remember to check the “use qualified names” checkbox so that it still reads from the correct database schema once connected).
Sshot-7
Now set permissions on each of the connection pools, so that only the relevant BI Server security group can connect through them.
Sshot-8
Then when users log in, they’ll be assigned to the correct connection pool (as it’s the only one, for that data source, they’ll have permissions on). When the user then comes to run the query, they’ll run as the correct database user and get assigned to the correct consumer group, and then if they hit a resource directive issue, they will either get bumped down a group or, as in the case below, have their query aborted as it exceeds the allowed time estimate.
Sshot-9
Full details of Oracle Database Resource Manager can be found in the online docs here.

Database Objects,

Creating a Database Object Manually in the Physical Layer



If you create a database object manually, you need to manually set up all database elements such as connection pool, tables, and columns.
NOTE:  For multidimensional data sources, if you create the physical schema in the physical layer of the repository, you need to create one database in the physical layer for each cube, or set of cubes, that belong to the same catalog (database) in the data source. A physical database can have more than one cube. However, all of these cubes must be in the same catalog in the data source. You specify a catalog in the Connection Pool dialog box.
CAUTION:  It is strongly recommended that you import your physical schema.
To create a database object
  1. In the Physical layer of the Administration Tool, right-click and choose New Database.
    Make sure that no object is selected when you right-click.
  2. In the Database dialog box, in the General tab, complete the fields using Table 5 as a guide.
Table 5. Fields General Tab of the Database Dialog Box
Field
Description
Allow direct database requests by default (check box)
When checked, allows everyone to execute physical queries. The Oracle BI Server will send unprocessed, user-entered, physical SQL directly to an underlying database. The returned results set can be rendered in Oracle BI Presentation Services, and then charted, rendered in a dashboard, and treated as an Oracle BI request.
If you want most but not all users to be able to execute physical queries, check this option and then limit queries for specific users or groups. For more information about limiting queries, refer to Managing Query Execution Privileges.
CAUTION:  If configured incorrectly, this can expose sensitive data to an unintended audience. For more information, refer to Recommendations for Allowing Direct Database Requests by Default.
For more information about executing physical SQL, refer to Oracle Business Intelligence Answers, Delivers, and Interactive Dashboards User Guide.
Allow populate queries by default (check box)
When checked, allows everyone to execute POPULATE SQL. If you want most but not all users to be able to execute POPULATE SQL, check this option and then limit queries for specific users or groups. For more information about limiting queries, refer to Managing Query Execution Privileges.
Data Source Definition
CRM Metadata Tables
Not available for multidimensional data sources. When selected, the import utility will look for the table definition in Oracle's Siebel CRM specific tables. For Siebel CRM tables, the import reads the Siebel metadata dictionary to define the definition of physical tables and columns (it does not read the database data dictionary). This is for legacy Siebel Systems sources only.

Data Source Definition
Database
The database type for your database.
For more information about using the Features tab to examine the SQL features supported by the specified database type, refer to Specifying SQL Features Supported by a Database.
Data Source Definition
Virtual Private Database
Identifies the physical database source as a virtual private database (VPD). When a VPD is used, returned data results are contingent on the users authorization credentials. Therefore, it is important to identify these sources. These data results affect the validity of the query result set that will be used with Caching. For more information, see Query Caching in the Oracle BI Server.
NOTE:  If you select this check box, you also should select the Security Sensitive check box in the Session Variable dialog box. For more information, see Creating Session Variables.
Persist Connection Pool
To use a persistent connection pool, you must set up a temporary table first. For more information, refer to Setting Up the Persist Connection Pool Property.

General

Database

Database define the default features of the database.

Virtual Private Database

The virtual Private Database check box identifies the physical database source as a virtual private database (VPD). When a VPD is used, returned data results are contingent on the user's authorization credentials. Therefore, it is important to identify these sources. These data results affect the validity of the query result set that is used with caching.
Virtual Private Database specify that the data source is using row-level database security. If you are using row-level database security with shared caching, then you must select this option to prevent the sharing of cache entries whose security-sensitive variables do not match.

Persist Connection Pool

persist connection pool is a database property that is used for specific types of queries (typically used to support Marketing queries).
In some queries, all of the logical query cannot be sent to the transactional database because that database might not support all of the functions in the query. This issue might be solved by:
  1. temporarily constructing a physical table in the database
  2. and rewriting the Oracle BI Server query to reference the new temporary physical table.

Allow populate queries by default

When selected, allows everyone to execute POPULATE SQL. (When a criteria block is cached, the Populate stored procedure writes the Cache/Saved Result Set value to the database).
If you want most, but not all, users to be able to execute POPULATE SQL, deselect this option and then limit queries for specific users or groups.

Allow direct database requests by default

When selected, allows all users to execute physical queries. See OBIEE 10G/11G - Direct Database Request

OBIEE - Database Features Parameters

About

When you create a database in the OBIEE physical layer some databases features parameters are automatically checked depending on the type of your databaseYou can find the type in the database section of the database object. This features are mostly parameters that control the generation of the physical query.
When a feature is marked as supported (checked) in the Features tab of the Database dialog, the Oracle BI Server typically pushes the function or calculation down to the data source for improved performance. When a function or feature is not supported in the data source, the calculation or processing is performed in the Oracle BI Server.
The supported features list in the Features tab uses the feature defaults defined in the DBFeatures.INI file.

Articles Related

Syntax

The syntax of the parameters is ”the_feature_SUPPORTED”
Example:
  • LEFT_OUTER_JOIN_SUPPORTED,
  • RIGHT_OUTER_JOIN_SUPPORTED,

Type of features

Database operations/functions

If the database is able to perform the database operations (Left outer join, Right outer join, …) or some functions (AVG, MIN, MAX, …) for the two first. If one feature is not supported (not checked), OBIEE will performed it and act then as a database engine.

Generation of the SQL issued

How to generate the Physical SQL issued:
  • WITH_CLAUSE_SUPPORTED,
  • PERF_PREFER_MINIMAL_WITH_USAGE,
  • PERF_PREFER_INTERNAL_STITCH_JOIN
Some features even enabled and pushed out to the underlying database may slow the query. For instance, ROWNUM is a supported feature of Teradata but significantly decrease the query performance.

Default values

The default value are defined in the file Oracle_Bi_Home\server\Config\DBFeatures.INI and you can change them:

OBIEE 10G/11G - Direct Database Request

About

The Direct Database Request permit you to perform SQL statement directly to a datasource. The Oracle BI Server sends unprocessed, user-entered, physical SQL directly to an underlying database. The returned results set can be rendered in Oracle BI Presentation Services, and then charted, rendered in a dashboard, and treated as an Oracle BI request.
Becareful, you can perform SELECT but also CREATE or even DELETE and DROP statement!
You bypass completely the OBI Server mechanisms such as :
You can use it to perform complex query such as using a table function.

Articles Related

How to create a Direct Database Access ?

Access to Direct Database Access

10G

Click on answer and you should see a link in the subject area. (If not see the security paragraph below)

11G

In the global header, select New, then Analysis, then Create Direct Database Request.

Creation

Enter :
  • the connection pool
  • the sql statement
You can find the name of the connection pool in the Oracle BI Repository in the physical layer.
You can use in the SQL statement a variable. Below, a example with a presentation service variable with a default value of 'Photo'.

Database Request in Dashboard

Add a prompt in the dashboard to update the presentation service variable and the Direct Database Request can be filtered.
And the download link works perfectly and gives you the filtered data (Tested on version 10.3.4.1)

Security, Privileges

OBI Presentation Service

You must grant your account with the privilege “Write Back to database” :
  1. Login in OBI Presentation Service Website
  2. Follow this links : Setting / Administration / Manage Privileges
  3. Grant the privilege Answers/“Execute Direct Database Requests” to the permitted group

Administration Tool

You must grant the direct access database to the user through the Administration Tool in the security part.
  1. Login in OBI Administration
  2. Go to the menu : Manage / Security
  3. Grant the privilege “Execute Direct Database Access” to the permitted group of user
write_back_execute_direct_database_request.jpg

Support

ORA-00911: invalid character at OCI call OCIStmtExecute

Be careful that you have to suppress the semicolon at the end of the statement.

[nQSError: 27022] Unresolved Connection Pool object: ..... (HY000)

Be sure to have the name of the database and the name of the connection pool framed by two doubles quotes.
Example:
database."Connection Pool"
is not good whereas
"database"."Connection Pool"
is good.

Documentation / Reference