Executing an SQL query by using the klsql2 utility
This article describes how to use the klsql2 utility, and how to execute an SQL query by using this utility.
To use the klsql2 utility:
Go to the directory where Kaspersky Security Center Linux Administration Server is installed. The default installation path is /opt/kaspersky/ksc64/sbin.
In this directory, create a blank file with the .sql extension.
Open the created .sql file in any text editor.
In the .sql file, type the SQL query that you want, and then save the file.
On the device with Kaspersky Security Center Linux Administration Server installed, in the command line, type the following command to execute the SQL query from the .sql file and save the results to the result.xml file:
sudo ./klsql2 -i src.sql -o result.xml
Open the newly created result.xml files to view the SQL query results.
You can edit the .sql file and create any query to the public views. Then, from the command line, execute your SQL query and save the results to a file.