Log Files for SQL Processes
If you are experiencing problems with a specific SQL statement, you need to provide the log files for SQL processes.
Make sure you have enough free disk space for the log. For more information, see EXAsupport.
Prerequisite
There are no prerequisites for this procedure.
Procedure
The following examples are written in Bash on a Linux terminal and use the tool confd_client, which is accessed by connecting to EXAClusterOS on the database nodes. You can also interact with ConfD using Python and XML-RPC. For more information, see ConfD.
Placeholder values are normally indicated with UPPERCASE characters. Replace the placeholders with your own values.
-
To interact with ConfD, connect to EXAClusterOS on the database access node. For example:
When you are connected to EXAClusterOS you can run ConfD jobs using
confd_client
. -
To find the name of the database, use the ConfD job db_list. For example:
-
Do one of the following:
- To collect information about all SQL processes, use the following command. Make sure to specify the start date (
-s
) and end date (-t
). Dates are in the formatYYYY-MM-DD
.. For example: - To collect information about a specific SQL process, use the following command. Make sure to specify the start date (
-s
) and end date (-t
). Dates are in the formatYYYY-MM-DD
. .You can only collect SQL logs for a specific session on the same day the session occurred. .
If the log file was created successfully, you will see the following message containing the file name:
- To collect information about all SQL processes, use the following command. Make sure to specify the start date (
- To disconnect from EXAClusterOS, type exit or CTRL+D.
-
The database access node is typically n10. The COS port is typically 20002. To find the database access node's IP address and COS port, use the c4 Show Current Deployments (
ps
) command. For example: - Copy the logs to your local computer using a Secure File Copy (
scp
) command. Use the exact file name and path previously displayed. For example:scp -P $COS_PORT -i ~/.ssh/$PEM_FILE.xml root@$DB_ACCESS_NODE_IP:/exa/tmp/support/$EXACLUSTER_FILENAME.tar.gz /path/to/folder/
If you don't remember your PEM file name, search for the CCC_AWS_KEY_PAIR_FILE value in your config file using the following command:
c4 config | grep CCC_AWS_KEY_PAIR_FILE
.
Verification
To verify the log was successfully copied, use the List Directory Contents (ls
) command on your local machine. For example:
returns: