How To Run A SQL Query Against Your Protect Database

Version 6


    There may be times when it is necessary to run a SQL query against your Protect database when working with support. The steps below give basic information on how to do this.




    You will need SQL Management Studio installed to perform the below steps. If you have a full version of SQL installed the management studio should be installed with it already. However, for SQL Express editions you will need to manually obtain and install the management studio.


    Links for this can be found here:


    Steps to run SQL Query against Protect Database   


    1. Open SQL Server Management Studio, and connect to the SQL server where your Protect databse exists.
    2. Expand the SQL Server > Databases, and locate your Protect database in the list.


    Note: The default name of the database is "Protect". If you have a previously upgraded database the name may be "Shavlikscans" or any other custom name that you used when originally creating the database.


    1. Right click on the Protect database, and choose "New Query".
    2. You can either enter the text here for a SQL query, or you can drag/drop a ".sql" file to the query window.


    Note: If you drag a .sql file to this window it will automatically copy in all the text of the sql query contained within the file.


    1. To run the query, click the "! Execute" button in the upper menu.

    An alternate method of executing the query is to go to the main menu > Query > Execute.
    Below is an example of what this all looks like:



    Additional Information


    You can find additional information about running SQL queries with these Microsoft articles:




    Affected Product(s)

    Shavlik Protect