Logs for SQL Processes

This article explains how to generate logs for SQL processes.

If you are experiencing problems with a specific SQL statement, you need to provide the log files for the SQL processes.

Prerequisites

You must have enough free disk space for the logs. For more information, see EXAsupport.

Procedure

The following examples use the c4 and confd_client command-line tools in a Linux terminal. For more information about these tools, see Exasol Deployment Tool (c4) and ConfD.

  1. Connect to EXAClusterOS (COS) on the cluster using c4 connect -t <DEPLOYMENT>[.<NODE>]/cos. For example:

    ./c4 connect -t 1.11/cos

    If you do not specify a node, c4 will connect to the first active node in the deployment.

    For more information about how to use c4 connect, see How to use c4.

  2. To find the name of the database, use the ConfD job db_list. For example:

    confd_client db_list
    - MY_DATABASE
  3. To collect information about SQL processes, use the EXAsupport tool. Specify the start date (-s) and end date (-t) using the format YYYY-MM-DD.

    You can collect information for all SQL processes, or for a specific session identified by its session ID.

    In Exasol versions prior to 8.25.0, you can only collect SQL logs for a specific session on the day that the session occurred. Later versions do not have this limitation.

    For example, to collect information about all SQL processes:

    exasupport -s 2022-08-11 -t 2022-08-11 -e MY_DATABASE -x2

    To collect information about a specific SQL session:

    exasupport -s 2022-08-11 -t 2022-08-11 -e MY_DATABASE -i SESSION_ID

    If the log file was successfully created, you will see the following message containing the file name:

    Successfully stored debug information into file /exa/tmp/support/exacluster_debuginfo_2022_08_11-23_27_20.tar.gz

  4. Use CTRL+D or type exit to disconnect from COS.

  5. Copy the log file to your local computer by connecting to COS and using the cat command:

    ./c4 connect -t <DEPLOYMENT>.<NODE>/cos -- "cat /exa/tmp/support/$FILENAME" > $FILENAME
    Example:
    ./c4 connect -t 1.11/cos -- "cat /exa/tmp/support/my_log" > my_log

Verification

To verify that the log was successfully copied, use the ls command in the target folder on your local machine.

Example
ls -lahtr ~/mylogs | grep exacluster_debuginfo
-rwxr-xr-x  1 user group 9.8K Sep 20 17:38 exacluster_debuginfo_2022_08_11-23_27_20.tar.gz