How To: Clean up Old Consoles from Protect Database

Version 7

    Purpose      


    The purpose of this document is to provide steps to remove old Shavlik Protect Consoles that are listed under Scanning database to report on when creating a report.

     

    Old Servers.PNG

     

    Prerequisites

     

    Confirm that you can run SQL queries against your database by following the steps in this article: How To Run A SQL Query Against Your Protect Database

     

    As you will be deleting information from your database, it is advised to perform a backup first in case something goes wrong.

     

    Steps to Clean up Old Consoles  

     

    1. Check the ConsoleIdentity table for consoleUID and consoleID of console(s) to remove from database
    2. From the ConsoleConfiguration table, delete the console records related to the consoleUID, which is in the id field
      Example:
      DELETE FROM Protect.dbo.ConsoleConfiguration 
      WHERE id='1EEB4B08-A9F5-4E33-B414-2BA717E43AFE'
    3. From the ConsoleIdentity table, delete the console records related to the consoleUID
      Example:

      DELETE FROM Protect.dbo.ConsoleIdentity
      WHERE consoleUID='1EEB4B08-A9F5-4E33-B414-2BA717E43AFE'
    4. If you receive an error when attempting to delete these records, it is because there are related records in another table, such as dbo.Scans. (scan and deployment results stored in the database)  The error will list the table and column containing the reference, which typically contain the console ID
      • These records will need to be cleared out first, and can be removed using the Protect Console under Manage > Items
        Example:

        Msg 547, Level 16, State 0, Line 1

        The DELETE statement conflicted with the REFERENCE constraint "FK_Scans_ConsoleIdentity". The conflict occurred in database "Protect", table "dbo.Scans", column 'ScanConsoleID'.

     

    Affected Product(s)

     

    Shavlik Protect 9.x