Enable Query Logging

To enable query logging for an Essbase cube, create a query logging settings file in the cube directory, configure it, and restart the cube. Log entries will be written to a query log .qlg file, which you can save and view as xml.

The following steps explain how to create a query log settings file. To see a sample query log file, see Query Logging Sample File.

To enable query logging:

  1. In the cube directory, create a query log settings file.

    The settings file must be named dbname.cfg, where dbname matches the name of the cube. For example, the query log settings file for Sample Basic is basic.cfg. As Essbase 21c applications are Unicode-mode, you must use a UTF-8-enabled text editor, and save as UTF-8 with BOM.

    Note:

    The cube directory means <Application Directory>/app/appname/dbname. If you do not know where <Application Directory> is in your environment,

    • Refer to Environment Locations in the Essbase Platform if you use an independent Essbase deployment.

    • If you use an Essbase deployment on Oracle Cloud Infrastructure Marketplace, then <Application Directory> is /u01/data/essbase/app.

  2. In the settings file, specify required and optional elements, using the syntax from the section Query Logging Syntax:
    • The dimension for which you want to log queries (QUERYLOG [dimension_name]).

    • Optional: The setting to log generation or level numbers for members of specified generations or levels in a dimension (QUERYLOG GENERATION generation-range or QUERYLOG LEVEL level-range).

    • Optional: The setting to exclude logging of members from specified generations or levels in a dimension (QUERYLOG NONE GENERATION generation-range or QUERYLOG NONE LEVEL level-range).

    • Optional: The location where the query log file is created (QUERYLOG LOGPATH path-expression).

    • Optional: The format of the log file output (QUERYLOG LOGFORMAT CLUSTER | TUPLE).

    • Optional: The size of the log file (QUERYLOG LOGFILESIZE n)

    • Optional: The size of all log files (QUERYLOG TOTALLOGFILESIZE n).

    • A setting to enable or disable query logging the next time the application starts (QUERYLOG ON | OFF).

  3. Restart the cube to accept the settings.

    Note:

    Restart after creating a file or changing any entries in a file.

  4. After query logging is enabled, review the log entries in the query log file, dbname.qlg.

    For example, you can view the output of the log file to analyze how many times a certain member has been queried. Use a UTF-8-enabled editor to view the log files.