Query Logging Settings Procedure

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 ARBORPATH\App\appname\dbname directory of Essbase, create a query log settings file.

    The settings file must be named dbname.cfg, where dbname matches the name of the database. For example, the query log settings file for Sample Basic is basic.cfg. For databases in Unicode-mode applications, the query log file must be encoded in UTF-8 and include the UTF-8 signature.

  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 database 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. You can use a UTF-8-enabled editor to view query log files for databases in Unicode-mode applications.