Download Enabling Usage Tracking

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft SQL Server wikipedia , lookup

Relational model wikipedia , lookup

PL/SQL wikipedia , lookup

Database model wikipedia , lookup

Navitaire Inc v Easyjet Airline Co. and BulletProof Technologies, Inc. wikipedia , lookup

Oracle Database wikipedia , lookup

Transcript
Enabling Usage Tracking
Copyright © 2008, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to:
• Identify the need for usage tracking
• Set up and administer Oracle BI usage tracking
21 - 2
Copyright © 2008, Oracle. All rights reserved.
Business Challenges
• When deployed first, Oracle BI may not be optimized for the
querying that actually occurs:
– End-user queries may not match what is expected, so cache
is not seeded with appropriate queries.
– Additional aggregate tables may need to be created to speed
up query processing.
• Your company may need to track database usage on a user
or departmental level:
– Users may be charged for database use.
– Regulatory requirements may require usage tracking.
21 - 3
Copyright © 2008, Oracle. All rights reserved.
Business Solution: Oracle BI Usage Tracking
• Tracks and stores Oracle BI Server usage at the detailed
query level
• Supports the accumulation of usage tracking statistics that
can be used in a variety of ways, such as:
– Database performance optimization
– Aggregation strategies
– Billing users or departments based on the resources they
consume
• Provides ability to analyze usage results using Oracle BI
Answers or other reporting tools
21 - 4
Copyright © 2008, Oracle. All rights reserved.
Oracle BI Usage Tracking Methods
There are two methods for enabling usage tracking:
• Direct insertion (recommended approach)
– Oracle BI Server inserts statistics for every query directly into
a relational database table.
• Log file
– Oracle BI Server inserts statistics for every query into a log
file.
21 - 5
Copyright © 2008, Oracle. All rights reserved.
ABC Example
Set up Oracle BI usage tracking to track and store usage
statistics at the detailed query level.
Username
21 - 6
Start date and time
Logical SQL
Row count
Copyright © 2008, Oracle. All rights reserved.
Query run time
Steps to Enable Usage Tracking
1.
2.
3.
4.
5.
6.
7.
8.
9.
21 - 7
Create the usage tracking table.
Import the table.
Build a business model.
Enable usage tracking.
Enable direct insertion.
Set the physical table parameter.
Set the connection pool parameter.
Set additional parameters.
Test the results.
Copyright © 2008, Oracle. All rights reserved.
1. Create the Usage Tracking Table
• Navigate to ..\OracleBI\server\Schema.
• Use the provided SAACCT.<db>.sql script to create the
S_NQ_ACCT usage tracking table.
– This table stores the usage tracking data when queries are
run against Oracle BI Server.
21 - 8
Copyright © 2008, Oracle. All rights reserved.
2. Import the Table
Import the usage tracking table to the Physical layer.
21 - 9
Copyright © 2008, Oracle. All rights reserved.
3. Build a Business Model
Use S_NQ_ACCT to build a usage tracking business model.
21 - 10
Copyright © 2008, Oracle. All rights reserved.
4. Enable Usage Tracking
a. Navigate to ..\OracleBI\server\Config and open
NQSConfig.ini.
b. Scroll to Usage Tracking Section.
c. Set ENABLE = YES;.
21 - 11
Copyright © 2008, Oracle. All rights reserved.
5. Enable Direct Insertion
Set the DIRECT_INSERT parameter to YES to specify that
statistics are inserted directly into a database table.
21 - 12
Copyright © 2008, Oracle. All rights reserved.
6. Set the Physical Table Parameter
Set the PHYSICAL_TABLE_NAME parameter to specify the
table into which to insert records corresponding to the query
statistics.
• The table name is the fully qualified name as it appears in
the Physical layer of the Server Administration Tool.
• The general structure of this parameter depends on the type
of database being used:
– For Oracle: PHYSICAL_TABLE_NAME =
"<Database>"."<Schema>"."<Table>" ;
21 - 13
Copyright © 2008, Oracle. All rights reserved.
7. Set the Connection Pool Parameter
Set the CONNECTION_POOL parameter to specify the
connection pool to use for inserting records into the usage
tracking table.
• This is the fully qualified name as it appears in the Physical
layer of the Server Administration Tool.
• Example: CONNECTION_POOL = "ABC Usage Tracking
"."ABC Usage Tracking Connection Pool“ ;.
21 - 14
Copyright © 2008, Oracle. All rights reserved.
8. Set Additional Parameters
• BUFFER_SIZE
– Amount of memory used to store insert statements
temporarily
• BUFFER_TIME_LIMIT_SECONDS
– Maximum amount of time that an insert statement remains in
the buffer before it is issued to the usage tracking table
• NUM_INSERT_THREADS
– Number of threads that remove insert statements from the
buffer and issue them to the usage tracking table
• MAX_INSERTS_PER_TRANSACTION
– Number of records to group together as a single transaction
when inserting into the usage tracking table
21 - 15
Copyright © 2008, Oracle. All rights reserved.
9. Test the Results
• Use usage tracking subject area to build and run queries:
• Check the log file and verify that the S_NQ_ACCT table is
accessed:
21 - 16
Copyright © 2008, Oracle. All rights reserved.
Analyzing Usage Tracking Data
• Watch for long-running queries (typically ad hoc):
– End user may need training.
– May need to assign query blocking/restrictions on how long
queries can run or on number of records returned
– Database may require additional indexes or tuning.
• Perform usage audits for:
– Regulatory compliance
– Security
• Determine whether a query should be used to seed the
cache or be removed from the cache-seeding queries.
• Identify aggregation strategies.
• Bill users or departments based on the resources that they
consume.
21 - 17
Copyright © 2008, Oracle. All rights reserved.
Usage Tracking Sample
The <OracleBI_HOME>/server/Sample/Usage
Tracking directory contains the following to help you
understand and use usage tracking features:
• SQL_Server_Time: Scripts for populating sample tables
• Usage Tracking: Sample presentation catalog
• UsageTracking.rpd: Sample repository
21 - 18
Copyright © 2008, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to:
• Identify the need for usage tracking
• Set up and administer Oracle BI usage tracking
21 - 19
Copyright © 2008, Oracle. All rights reserved.
Practice 21-1 Overview:
Enabling Usage Tracking
This practice covers the following topics:
• Setting up Oracle BI to support usage tracking
• Building a usage tracking business model
• Using usage tracking to monitor queries
21 - 20
Copyright © 2008, Oracle. All rights reserved.