You are on page 1of 16

Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

Setting Up Usage Tracking in Oracle BI 11g

Purpose

This tutorial shows you how to set up usage tracking and create usage reports to monitor queries in Oracle BI 11g.

Time to Complete

Approximately 30 minutes

Introduction

The Oracle BI Server supports the collection of usage tracking data. When usage tracking is enabled, the Oracle BI Server collects usage tracking
data for each query, and it writes statistics to a usage tracking log file or inserts them directly into a database table.

It is strongly recommended that you use direct insertion instead of writing to a log file. The Oracle BI Summary Advisor feature works in conjunction
with the usage tracking feature. Summary Advisor works only with direct insertion usage tracking. Oracle BI Summary Advisor is available when
you are running Oracle Business Intelligence on the Oracle Exalytics Machine.

This tutorial shows you how to set up and use usage tracking. Usage tracking is also helpful in determining which user queries are creating
performance bottlenecks, based on query frequency and response time. In this tutorial, you use a database table.

Prerequisites

Before starting this tutorial, you should:

Complete the tutorial Creating a Repository Using the Oracle BI 11g Administration Tool.
Have access to or have installed Oracle Database 11.2 or later
Have access to or have installed Oracle BI EE 11.1.1.6.0 or later
Have access to or have installed the BISAMPLE sample schema that is included with the Sample Application for Oracle Business
Intelligence Suite Enterprise Edition Plus. There are two options for accessing the BISAMPLE schema:

1. If you already have installed V107 of the Sample Application, verify that you have access to the BISAMPLE schema and begin the
tutorial.

2. If you want to download and install the complete Sample Application, you can access it here on the Oracle Technical Network (OTN).
Install the SampleApp V107 install files. Note, however, that only the BISAMPLE schema is required to complete this tutorial.

In this section, you check for the existence of the S_NA_ACCT Usage Tracking table in the database Repository Creation Utility (RCU) schema.
You then create the three layers in the BI Repository for Usage tracking.

Checking for Usage Tracking Table


1. In this sub-section, you check for the existence of the S_NA_ACCT Usage Tracking table in the database Repository Creation
Utility (RCU) schema. In this example, the data source name is orcl, the schema name is dev_biplatform, and the password is
Oracle01. Open SQL*Plus on your desktop. Log in with the user name dev_biplatform and password Oracle01.

2. At the SQL prompt, enter the following SQL statement:

SQL>Select table_name from tabs where table_name like 'S%';

1 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

3. Check the columns names by entering the following statement:

SQL>Desc S_NQ_ACCT;

You can also use SQL Developer to check for the S_NQ_ACCT table.

Creating the Database Object in the Physical Layer

Creating the Business Model Layer for Usage Tracking


1. Right-click in the Business Model and Mapping layer white space and select New Business Model.

2 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

2. Name the business model 13-Usage Tracking 2, and then click OK. Note: there is a similar business model name 10 - Usage
Tracking. This is set up by Sample Applications.

3. Right-click 13-Usage Tracking 2 and select New Object>Logical Table.

4. Name the table Measures and click OK.

3 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

5. Repeat and add three more tables - Time, Topic, and User to the 13-Usage Tracking 2 business model.

6. Drag the following three physical columns from Usage Tracking Schema>S_NQ_ACCT to the Measures logical table in the 13-
Usage Tracking 2 business model. For each column, right-click the logical column and select Rename, and then rename as
follows:

Physical Column Rename


QUERY_TEXT Query Count
ROW_COUNT Row Count
TOTAL_TIME_SEC Total Time Seconds

7. Right-click the column Query Count and select Properties.

4 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

8. Click the Aggregation tab and select Count from the Default aggregation rule drop-down list. Click OK.

9. Similarly, set the Aggregation rule for other logical columns in the Measures logical table as follows:

Logical Column Aggregation Rule

Row Count Sum


Total Time Seconds Sum

10. Drag the following three physical columns from Usage Tracking Schema>S_NQ_ACCT to the Time logical table in the 13-Usage
Tracking 2 business model. Rename them as follows:

Physical Column Rename


START_DT Start Date
START_HOUR_MIN Start Hour Minute
END_HOUR_MIN End Hour Minute

11. The Time logical table should look like this:

12. Set Start Date as the logical key for the Time logical table. Right-click the Time logical table and select Properties.

13. Click the Keys tab and enter Time_key in the Key Name column.

5 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

14. Select Start Date from the Columns drop-down list. Click OK.

15. Drag the following two physical columns from Usage Tracking Schema>S_NQ_ACCT to the Topic logical table in the 13-Usage
Tracking 2 business model. Rename them as follows:

Physical Column Rename


Logical
QUERY_TEXT
SQL
Subject
SUBJECT_ AREA_NAME
Area

16. Set Logical SQL as the logical key for the Topic logical table.

17. Drag the USER_NAME physical column from Usage Tracking Schema>S_NQ_ACCT to the User logical table in the 13-Usage
Tracking 2 business mode. Rename it to User Name.

18 Set User Name as the logical key for the User logical table

6 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

19. Use the Business Model Diagram to create logical joins from Measures to Time. Right-click the 13-Usage Tracking 2 business
model and select Business Model Diagram>Whole Diagram.

20. Click the New Join icon from the menu and create logical joins from Measure to Time, Topic, and User as shown below. Close
the diagram.

You have now created the Usage Tracking business model. You will next move it to the Presentation layer.

Creating the Presentation Layer


1. Drag the 13-Usage Tracking 2 business model to the Presentation layer to create the Presentation layer objects. Rename the
subject area to Y-Usage Tracking 2.

7 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

2. Save the repository. A message will ask whether you want to check consistency. Click Yes. You should then receive a message
stating - Business model 13-Usage Tracking 2 is consistent. Do you want to mark it as available for queries? Click YES.
The Consistency Check Manager window is displayed.

3. Click Close in the Consistency Check manger. Close the repository and the BI Administration Tool.

You have now finished creating the Y-Usage Tracking 2 subject area. Note: In Sample Applications, there is another usage
tracking subject area name U - Usage Tracking.

You now configure usage tracking through Oracle Enterprise Manager (EM) by performing the following steps:

1. Log into EM. In this example, the user name is weblogic and the password is welcome1.

8 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

2. Select WebLogic Domain>bifoundation_domain from the left navigation pane.

3. Click the WebLogic Domain drop-down list in the right pane.

4. Select System MBean Browser from the list.

9 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

5. Expand Application Defined MBeans>oracle.biee.admin.

6. Expand bifoundation_domain.

7. Lock the domain to update it. Expand BIDomain and select the BIDomain MBean where group=Service. Note: Expand Show
MBean Information in the right pane.

10 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

8. Click the Operations tab.

9. Click the Lock link. On the Operation:lock page, click the Invoke button.

11 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

10. Click the Return button.

11. Expand BIDomain.BIInstance.ServerConfiguration, and then select the BIDomain.BIInstance.ServerConfiguration MBean.

12. Click the Attributes tab. Scroll down and click UsageTrackingCentrallyManaged. Set Value to true in the drop-down list.

12 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

13. Click the Apply button. When you see the confirmation message for the update, click the Return button.

14. Similarly, set the UsageTrackingEnabled attribute to true to enable usage tracking.

15. Set the UsageTrackingDirectInsert attribute to true to enable direct insertion.

13 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

16. Set the UsageTrackingPhysicalTableName attribute to the name of the fully qualified database table for collecting query statistic
information, as it appears in the Physical layer of the Oracle BI repository. In this example, it is set as follows:

"12-Usage Tracking"."Usage Tracking Schema"."S_NQ_ACCT"

17. Set the UsageTrackingConnectionPool attribute to the name of the fully qualified connection pool for the query statistics database, as
it appears in the Physical layer of the Oracle BI repository. In this example, it is set as follows:

"12-Usage Tracking"."UsageTracking Connection Pool"

Note: For usage tracking insertions to succeed, the connection pool must be configured with a user ID that has write access to the
back-end database. Also, it is recommended that the connectivity type support international data.

18. After applying your changes, release the lock on the domain, as follows:

14 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

Click Invoke.
Click Return.

19. Go to the Oracle Business Intelligence Instance page and click Restart All on the Availability>Processes tab.

You now run analyses to populate the Usage Tracking S_NQ_ACCT table, and then you run queries on the table to get details of these queries.

Creating and Running to Populate Usage Tracking Table

Creating and Running Analyses to Verify Usage Tracking

15 of 16 8/31/2017 12:11 PM
Setting up Usage Tracking in Oracle BI 11g http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11...

In this tutorial, you should have learned how to:

Set up the three layers in the BI Administration Tool for usage tracking
Configure usage tracking by using Enterprise Manager
Populate the usage tracking table
Run queries against the usage tracking table, to get user query details

Resources

All other tutorials related to Oracle Business Intelligence


Oracle Business Intelligence documentation
Oracle Business Intelligence product page on OTN
Oracle Learning Library
Oracle University

16 of 16 8/31/2017 12:11 PM

You might also like