Enabling query history

Deployment options: Netezza Performance Server for Cloud Pak for Data System Netezza Performance Server for Cloud Pak for Data

Learn how to enable query history.

When you go to the Query history or Encumbrance pages, you can't see the encumbrance list if query history is not enabled in the system. Learn how to enable query history.

About this task

Enabling query history without configuration files

Procedure

  1. Log in to the web console and go to Queries > History configurations.
    You can see the Enable query history button if query history is not enabled. When you select this option, the Enable query history page appears.
  2. Pick your username.

    For Netezza Performance Server for Cloud Pak for Data, select an existing user.

    For Netezza Performance Server for Cloud Pak for Data System, create a new user.

    A query history database must be linked with a separate history user.
    This is the database user account for accessing and inserting data to the query history database. This name is the username that is specified in the nzhistcreatedb command. This user must have Manage Security privileges for the history database (_v_qryhist).
    Add following privileges for histuser and histdbowner during history configuration:
    grant create database to histuser;
    grant create database to histdbowner;
    grant list on user to histuser;
    grant list on user to histdbowner; 

    For Netezza Performance Server for Cloud Pak for Data System 1.0.X, see Viewing groom statuses.

    For Netezza Performance Server for Cloud Pak for Data System 2.0.X, see Granting privileges.

    For Netezza Performance Server for Cloud Pak for Data, see Granting privileges.

  3. Specify the Password.
    The password is associated with the username that you selected in step 3.
  4. Pick a new History database name.
    This specifies the history database to which the captured data is written. During the enablement, a new database is created so the database you choose must not exist. The database name cannot be the same as the username.
  5. Pick a History configurations name.
  6. Check the Restart server checkbox to agree to restart the current instance during the enabling process.
    If you don't restart the system, query history can't be enabled successfully.
  7. Click Create to start enabling query history.
    Because the system is going to restart, you can refresh the page if needed.

Enabling query history with configuration files

Procedure

  1. Log in to the web console and go to Queries > History configurations.
    You can see the Enable query history button if query history is not enabled. When you select this option, the Enable query history page appears.
  2. Select a valid history configuration from the list.
  3. Select Set as current config from the overflow menu for the history configuration, which you picked.
    Query history is now enabled.
    Note: HIST_DISABLED cannot be used to enable query history. Its purpose is to disable the query history. When query history is enabled and you use the HIST_DISABLED configuration, and set it as the current configuration, the query history section is unavailable.