Hi Freinds,
Today we will discuss the usage tracking implementation in OBIEE 11g.
A usual requirement is to enable usage tracking to gather statistics about usage of OBIEE, things like performance, which Dashboards/Reports are being utilized, who is logging in, etc. Out of the box, Oracle includes a robust usage tracking capability with OBIEE, and in fact includes a sample RPD with the Usage Tracking Subject area during install.
There are three main components:
- Changes/configuration in the RPD
- Configuration in Enterprise Manager
- SQL to run to setup Usage Tracking schema.
Continue on to read the steps to enable Usage Tracking
Schema Setup:
- Using TOAD (or SQLPLUS) connect to the BIPLATFORM schema (DEV_BIPLATFORM, or whatever you called it during installation) on the database which you configured for this OBIEE 11g instance.
- Run the four Oracle scripts to setup Usage Tracking (found in SQL_Server_Time folder, where the sample RPD is included, see top of post):
- Oracle_create_nQ_Calendar.sql
- Oracle_create_nQ_Clock.sql
- Oracle_nQ_Calendar.sql
- Oracle_nQ_Clock.sql
- Remember to Commit!
Run DDL and DML scripts to create and
populate the following tables in DEV_BIPLATFORM schema .
(/mwh/instances/instance1/bifoundation/OracleBIServerComponent/coreapplication_obis1/schema)
S_NQ_ACCT
S_ETL_DAY
S_ETL_TIME_DAY
NQ_LOGIN_GROUP (VIEW)
RPD Changes:
The sample RPD can be found at:{OBIEE_11G_Instance}/bifoundation/OracleBIServerComponent/coreapplication_obis1/sample/usagetracking
You will need to copy the Physical, BMM, and Presentation components from the sample UsageTracking.rpd to your development/test/production RPD. Note that I had to make a few changes to the included RPD. If the UsageTracking subject area is not as OBIEE is expecting, then OBIEE will fail to update the table with usage details, and give an error message in the nqserver.log.
- Open the RPD with the Admin Tool.
- Expand the S_NQ_ACCT table in the physical layer and check that all of the following fields exist with the correct data type.
- Rename RUNAS_USER_NAME to IMPERSONATOR_USER_NAME
- Add the following missing fields (right click on S_NQ_ACCT, select New Object -> Physical Column…)
- ID
- Type: VARCHAR
- Length: 50
- Nullable: Unchecked
- QUERY_BLOB
- Type: LONGVARCHAR
- Length: 4000
- Nullable: Checked
- QUERY_KEY
- Type: VARCHAR
- Length: 128
- Nullable: Checked
- Below is a list of all of the required fields, data type, length, and nullable flag:
Field Name | Data Type | Length | Nullable? |
CACHE_IND_FLG | CHAR | 1 | No |
COMPILE_TIME_SEC | DOUBLE | Yes | |
CUM_DB_TIME_SEC | DOUBLE | Yes | |
CUM_NUM_DB_ROW | DOUBLE | Yes | |
END_DT | DATETIME | Yes | |
END_HOUR_MIN | CHAR | 5 | Yes |
END_TS | DATETIME | Yes | |
ERROR_TEXT | VARCHAR | 250 | Yes |
ID | VARCHAR | 50 | No |
IMPERSONATOR_USER_NAME | VARCHAR | 128 | Yes |
NODE_ID | VARCHAR | 15 | Yes |
NUM_CACHE_HITS | DOUBLE | Yes | |
NUM_CACHE_INSERTED | DOUBLE | Yes | |
NUM_DB_QUERY | DOUBLE | Yes | |
PRESENTATION_NAME | VARCHAR | 128 | Yes |
QUERY_BLOB | LONGVARCHAR | 4000 | Yes |
QUERY_KEY | VARCHAR | 128 | Yes |
QUERY_SRC_CD | VARCHAR | 30 | Yes |
QUERY_TEXT | VARCHAR | 1024 | Yes |
REPOSITORY_NAME | VARCHAR | 128 | Yes |
ROW_COUNT | DOUBLE | Yes | |
SAW_DASHBOARD | VARCHAR | 150 | Yes |
SAW_DASHBOARD_PG | VARCHAR | 150 | Yes |
SAW_SRC_PATH | VARCHAR | 250 | Yes |
START_DT | DATETIME | Yes | |
START_HOUR_MIN | CHAR | 5 | Yes |
START_TS | DATETIME | Yes | |
SUBJECT_AREA_NAME | VARCHAR | 128 | Yes |
SUCCESS_FLG | DOUBLE | Yes | |
TOTAL_TIME_SEC | DOUBLE | Yes | |
USER_NAME | VARCHAR | 128 | Yes |
- The join between S_NQ_ACCT and NQ_LOGIN_GROUP is broken. Select both tables, right click and choose Phyiscal Diagram -> Selcted Object(s) Only.
- Select the red arrow, and click Delete to remove the broken join.
- Now click on the new join icon
- Draw a new join from S_NQ_ACCT to NQ_LOGIN_GROUP and change the join condition to:
- "OBI Usage Tracking"."dbo"."NQ_LOGIN_GROUP"."LOGIN" = "OBI Usage Tracking"."dbo"."S_NQ_ACCT"."USER_NAME"
- Click Ok.
- Close the physical diagram window.
- Now right click on the table S_NQ_ACCT and select properties.
- Select the Keys tab.
- If there is no key defined, enter ID in Key name and select the ID field from the drop down in the Columns field.
- Click Ok.
- Don't forget to setup proper Connection Pool information for both connection pools:
- Usage Tracking Connection Pool
- Usage Tracking Writer Connection Pool
Enterprise Manager Configuration:
The following outlines the steps needed within Enterprise Manager to configure and start Usage Tracking.
- Navigate to the Enterprise Manager (EM) of the host you are deploying to.
- Login with the admin credentials (biadmin/oracle01)
- Navigate to the Mbeans by expanding WebLogic Domain, selecting bifoundation_domain, and then from the drop down chooses System MBean Browser.
- Lock the Mbeans by navigating to:
- Application Defined MBeans->oracle.biee.admin->Domain: bifoundation_domain->BIDomain->BIDomain (the second one of the two)
- Click on the Operations tab.
- Click on lock.
- Click on Invoke.
- Click on Return.
- Navigate to the Usage Tracking mbeans:
- Application Defined MBeans->oracle.biee.admin->Domain: bifoundation_domain->BIDomain.BIInstance.ServerConfiguration->BIDomain.BIInstance.ServerConfiguration
- Click on Attributes.
- Set the following Attributes:
- UsageTrackingConnectionPool = "Oracle Analytics Usage"."Usage Tracking Writer Connection Pool"
- UsageTrackingEnabled = True
- UsageTrackingPhysicalTableName = "Oracle Analytics Usage"."dbo"."S_NQ_ACCT"
- Click on Apply.
- Commit the MBeans by navigating to:
- Application Defined MBeans->oracle.biee.admin->Domain: bifoundation_domain->BIDomain->BIDomain
- Click on the Operations tab.
- Click on commit (the first option).
- Click on Invoke.
- Click on Return.
- Navigate back to the main EM page.
- Under Business Intelligence, select coreapplicaiton.
- Click on the Overview tab, if you are not already there.
- Click on the Restart button.
- When prompted to restart all components, click on Yes.
- The process will take a few moments, but will let you know once it has completed.
Thanks
Saleem Syed (SS)
No comments:
Post a Comment