How to execute an SQL script in SQL Server Management Studio
Latest update: October 15, 2024
ID: 15907
Show applications and versions that this article concerns
- Kaspersky Security Center 15.1 (version 15.1.0.20748)
- Kaspersky Security Center 14.2 (version 14.2.0.26967)
- Kaspersky Security Center 14 (version 14.0.0.10902)
To troubleshoot your issue, a Kaspersky Technical Support specialist may ask you to run an SQL script in SQL Server Management Studio. For running the script, use an account that has access to the Kaspersky Security Center database and see the instructions below.
- Running the script without logging results to a file
- Running the script with logging results to a file
You can also create an SQL query to the Kaspersky Security Center database using the klsql2 utility.
How to run the script without logging results to a file
- Download and install SQL Server Management Studio using the instructions from the Microsoft support website.
- Run SQL Server Management Studio.
- To connect to the SQL server used by Kaspersky Security Center, click (Connect Object Explorer).
- Select the server parameters and click Connect.
- Click New Query.
- Select the Kaspersky Security Center database, its default name is “KAV”.
- Paste the SQL script file provided by a Kaspersky Technical Support engineer into the entry field and click Execute.
How to run the script with logging results to a file
- Download and install SQL Server Management Studio using the instructions from the Microsoft support website.
- Run SQL Server Management Studio.
- To connect to the SQL server used by Kaspersky Security Center, click (Connect Object Explorer).
- Select the server and click Connect.
- Click New Query.
- Select the Kaspersky Security Center database, its default name is “KAV”.
- Click (Results to file).
- To open the query settings, click (Query Options).
- Go to the section Results → Text and select Comma delimited in the Output format line in the drop-down list.
- Click OK.
- Paste the SQL script file provided by a Kaspersky Technical Support engineer into the entry field and click Execute.
- In the window that opens, specify the path to save the file.