Vous êtes sur la page 1sur 15

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.
After upgrading 10 g to 11g , need to manually setup Usage tracking in new 11g environment.
There are two ways
i)Still we can use old existing tables to write Usage information
ii)New schema DEV_BIPLATFORM can be used(Usage Tracking tables will be installed during
the RCU installation)
This blog covers first case where Old existing tables can be used for Usage tracking. Below are
the steps needed to be performed to enable Usage Tracking on existing 10g tables.
1. Check table structure of S_NQ_ACCT table in both 10g warehouse(existing) and 11g
DEV_BIPLATFORM schema.(Here we can find some difference)
2. Alter old table S_NQ_ACCT structure to in synch with 11g table.
3. Add new columns in RPD S_NQ_ACCT table
4.Eanable Usage Tracking in Enterprise Manager
1. Checking S_NQ_ACCT table structure
In order to reuse the existing Usage Tracking tables , we have to make sure tables structure
should be same in both 10g and 11g schemas.
Login to 10 g warehouse and describe S_NQ_ACCT
DESC S_NQ_ACCT
Name
Null

USER_NAME
REPOSITORY_NAME
SUBJECT_AREA_NAM
E
NODE_ID
START_TS
START_DT
START_HOUR_MIN

Type

VARCHAR2(128)
VARCHAR2(128)
VARCHAR2(128)
VARCHAR2(15)
DATE
DATE
CHAR(5)

END_TS
END_DT
END_HOUR_MIN
QUERY_TEXT
SUCCESS_FLG
ROW_COUNT
TOTAL_TIME_SEC
COMPILE_TIME_SEC
NUM_DB_QUERY
CUM_DB_TIME_SEC
CUM_NUM_DB_ROW
CACHE_IND_FLG
NOT NULL
QUERY_SRC_CD
SAW_SRC_PATH
SAW_DASHBOARD
SAW_DASHBOARD_PG
PRESENTATION_NAME
ERROR_TEXT
RUNAS_USER_NAME
NUM_CACHE_INSERTE
D
NUM_CACHE_HITS

DATE
DATE
CHAR(5)
VARCHAR2(1024)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(10)
CHAR(1)
VARCHAR2(30)
VARCHAR2(250)
VARCHAR2(150)
VARCHAR2(150)
VARCHAR2(128)
VARCHAR2(250)
VARCHAR2(128)
NUMBER(10)
NUMBER(10)

Login to DEV_BIPLATFORM schema in 11g and do describe on S_NQ_ACCT.


DESC S_NQ_ACCT
Name
USER_NAME
REPOSITORY_NAME
SUBJECT_AREA_NAM
E
NODE_ID
START_TS
START_DT
START_HOUR_MIN

Null

Type

VARCHAR2(128
)
VARCHAR2(128
)
VARCHAR2(128
)
VARCHAR2(50)
DATE
DATE
CHAR(5)

END_TS
END_DT
END_HOUR_MIN
QUERY_TEXT
QUERY_BLOB
QUERY_KEY
SUCCESS_FLG
ROW_COUNT
TOTAL_TIME_SEC
COMPILE_TIME_SEC
NUM_DB_QUERY
CUM_DB_TIME_SEC
CUM_NUM_DB_ROW
CACHE_IND_FLG
NOT NULL
QUERY_SRC_CD
SAW_SRC_PATH
SAW_DASHBOARD
SAW_DASHBOARD_P
G
PRESENTATION_NAM
E
ERROR_TEXT
IMPERSONATOR_USER_NAME
NUM_CACHE_INSERT
ED
NUM_CACHE_HITS
ID
NOT NULL

DATE
DATE
CHAR(5)
VARCHAR2(102
4)
CLOB
VARCHAR2(128
)
NUMBER(10)
NUMBER(20)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(10)
NUMBER(20)
CHAR(1)
VARCHAR2(30)
VARCHAR2(250
)
VARCHAR2(150
)
VARCHAR2(150
)
VARCHAR2(128
)
VARCHAR2(250
)
VARCHAR2(128
)
NUMBER(10)
NUMBER(10)
VARCHAR2(50)

Here columns in maroon color are existed in 10 g warehouse tables, but need to be altered in
terms of length and column rename.
Columns which are in Green color completely new in 11g,So these columns need to be added
into existing old tables.
2. Alter old table S_NQ_ACCT structure to in synch with 11g table.

To synch 10 g usage tracking tables with 11g tables, need to perform below alterations on the
10g usage tracking tables.
ALTER TABLE S_NQ_ACCT MODIFY NODE_ID VARCHAR2(50);
ALTER TABLE S_NQ_ACCT MODIFY ROW_COUNT NUMBER(20);
ALTER TABLE S_NQ_ACCT MODIFY CUM_NUM_DB_ROW NUMBER(20);
ALTER TABLE S_NQ_ACCT RENAME COLUMN RUNAS_USER_NAME TO
IMPERSONATOR_USER_NAME;
ALTER TABLE S_NQ_ACCT ADD (ID VARCHAR2(50) NOT NULL,QUERY_BLOB
CLOB,QUERY_KEY VARCHAR2(128));
COMMIT
3. Add new columns in RPD S_NQ_ACCT table
Open RPD in Offline ,Navigate to Physicala Database Oracle Analytics Usage->Catalog->dbo
Add the IMPERSONATOR_USER_NAME,ID,QUERY_BLOB,QUERY_KEY columns to the
S_NQ_ACCT table as shown below.
And Make sure Not Null checked for required columns.

4.Enable Usage Tracking in Enterprise Manager


To Enable Usage Tracking in EM ,perform below steps.
1. Log into EM.

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


3.

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

6.
7. Select System MBean Browser from the list

8.
9. Expand Application Defined MBeans>oracle.biee.admin.

10.
11. Expand bifoundation_domain.

12.

13. 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.

14.

15. Click the Operation tab.

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

18.
19. Click the Return button.
20. Expand BIDomain.BIInstance.ServerConfiguration, and then select the
BIDomain.BIInstance.ServerConfiguration MBean.

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

24. Click the Apply button. When you see the confirmation message for the update, click the
Return button.
25. Similarly, set the UsageTrackingEnabled attribute to true to enable usage tracking

26.
27. Set the UsageTrackingDirectInsert attribute to true to enable direct insertion.

28.
29. 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: Oracle Analytics Usage
.Catalog.dbo.S_NQ_ACCT
30.

31. 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: Oracle Analytics Usage
.Usage Tracking Writer Connection Pool
32.

33. 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.After applying your changes, release
the lock on the domain, as follows:

Return to the BIDomain MBean where group=Service under


oracle.biee.admin, Domain:bifoundation_domain, BIDomain.

Click the Operations tab.

Click one of the first commit operations.

34.

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

Rate this:

Vous aimerez peut-être aussi