Creating an SQL query using the klsql2 utility

This section describes how to download and use the klsql2 utility, and how to create an SQL query by using this utility. When you create an SQL query by means of the klsql2 utility, you do not have to provide database name and access parameters, because the query addresses Kaspersky Security Center public views directly.

To download and use the klsql2 utility:

  1. Download the klsql2 utility from Kaspersky website.
  2. Copy and extract the downloaded klsql2.zip file to any folder on the device with Kaspersky Security Center Administration Server installed.

    The klsql2.zip package includes the following files:

    • klsql2.exe
    • src.sql
    • start.cmd
  3. Open the src.sql file in any text editor.
  4. In the src.sql file, type the SQL query that you want, and then save the file.
  5. On the device with Kaspersky Security Center Administration Server installed, in the command line, type the following command to run the SQL query from the src.sql file and save the results to the result.xml file:

    klsql2 -i src.sql -o result.xml

  6. Open the newly created result.xml file to view the query results.

You can edit the src.sql file and create any query to the public views. Then, from the command line, execute your query and save the results to a file.

See also

Scenario: configuring event export to SIEM systems

Page top