How To Run A SQL Query Against Your Protect Database

Version 6

    Purpose       


    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.

     

    Prerequisites    

     

    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: http://community.shavlik.com/docs/DOC-23132

     

    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:

    SQLquery.jpg

     

    Additional Information

         

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

     

    http://technet.microsoft.com/en-us/library/ms177264.aspx

     

    http://technet.microsoft.com/en-us/library/ms174173.aspx

     


    Affected Product(s)


    Shavlik Protect