Escolar Documentos
Profissional Documentos
Cultura Documentos
Usage tracking in OBIEE 12c works in exactly the same way as 11g, tracking
all reports being run and queries fired to the database. Its also required if
you want to use the Summary Advisor to improve query performance.
Its configuration also isnt much different to 11g and Ill be running through
these steps here.
In this blog Ill run through the basic configuration to enable usage tracking.
In Part 2 Ill look at setting up the tables in the RPD for reporting.
Usage tracking writes records to the database via a connection pool in the
RPD. So before we can configure usage tracking we need to create this
connection pool. We do this by editing the RPD and importing the usage
tracking tables.
So open the RPD (online if possible, otherwise youll need to download it, edit
it and upload it afterwards).
Configure_usage_tracking_part1_1
In the Import Metadata screen change the connection type to OCI 10g/11g
(not sure why Oracle havent updated this to 12c too, but it works fine on
12c). Then enter the connection details the data source name required a
TNS entry either the TNS name (as in my screenshot) or the full TNS String,
something like (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxvm)
(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME =
ora12c)))
For the record the Admin tool uses the tnsnames.ora file from its own
installation directory on the client pc in my case its
C:\Oracle\Middleware\obiee12c\network\admin\tnsnames.ora
Then click next. If it fails to connect to your database you will get an error
and a chance to recheck your details.
Configure_usage_tracking_part1_2
In the in screen leave the default settings of Relational Sources, Tables, Keys
and Foreign Keys selected, just click next.
Configure_usage_tracking_part1_3
Configure_usage_tracking_part1_4
Configure_usage_tracking_part1_5
Youll then get the new connection pool window. All of the details are filled out
for you, but Id recommend changing the name from Connection Pool to
something like Usage Tracking Pool
Configure_usage_tracking_part1_6
Click Ok to perform the table import. Youll then see the three imported tables
in a new folder in the repository view:
Configure_usage_tracking_part1_7
Youll then see the new database connection, with its connection pool and the
three tables in the physical layer of the RPD:
Configure_usage_tracking_part1_8
Configure_usage_tracking_part1_9
Now take a note of the database name Usage Tracking Database and the
connection pool name Usage Tracking Pool, these well need below.
Finally save the RPD using the disk icon in the menu bar
Configure_usage_tracking_part1_10
And click ok to check in the changes before saving. When asked, there is no
need to check global consistency.
To enable usage tracking in OBIEE you need to turn it on and specify the
database location details. This is done by editing the NQSConfig.INI file. This
will be located in the following directory:
<obiee_home>/user_projects/domains/bi/config/fmwconfig/biconfig/OBIS
** note the /bi/ directory may be different if you have multiple domains on
your server **
Before editing the NQSConfig.INI file its best to take a backup copy first
First locate the [USAGE_TRACKING] section and change the ENABLE setting to
YES. Ignore the message about the setting being managed by the enterprise
manager.
Configure_usage_tracking_part1_11
A few lines further down check the DIRECT_INSERT setting is set to YES it
should be by default. For the record DIRECT_INSERT = YES tells OBIEE to write
the usage stats to a database table, a setting of NO will direct the stats to a
file the settings immediately above this let you specify a file if youd prefer
that (never yet come across anyone who does!)
Configure_usage_tracking_part1_12
The next setting is PHYSICAL_TABLE_NAME. This will currently set to the value
of:
<Database>.<Catalog>.<Schema>.<Table>;
And need replacing with the full path to the S_NQ_ACCT table as it was
imported into the RPD above:
Configure_usage_tracking_part1_13
In this case we only have a database, schema and table the catalog is an
optional extra layer you can have in physical layer, typically when a set of
data is sourced from multiple schemas.
Next just below is the CONNECTION_POOL. Again this is set to a default value
of <Database>.<Connection Pool>; and needs replacing with the actual
name, which in my case is
Next are two settings which are hashed out by default and are therefore
optional. If you want to use them remove the hash and set this as:
Configure_usage_tracking_part1_14
Now you need to perform a full stop and restart of OBIEE, using your normal
stop/start scripts.
You must be very careful with the above settings any typos will result in the
BI Server failing to start and the following error in the obis1-diagnostic.log
file:
[nQSError: 47031] Usage Tracking table name and connection pool have
mismatching database components
Once OBIEE has restarted, login and view a few dashboards or reports, then
look at the S_NQ_ACCT table in the database to confirm tracking stats are
being recorded:
Configure_usage_tracking_part1_15
You should also find that the S_NQ_DB_ACCT table has records too these are
the individual field references in each query. If you have any initblocks in your
RPD, then the S_NQ_INITBLOCK table will have entries as well.
So Usage Tracking is now enabled and all activity by your users will be stored
in the database. What we dont have is any reports. In the second part of this
blog Ill look at creating the subject area and setting up some usage tracking
reports.
Enjoy!