Praetor installs with several scripts to help manage the growing SQL databases, specifically the PraetorLog database which contains all the message summary log entries. These script files can be found in the Praetor Tools folder and each is described in the table below.
SQL Filename |
Description |
Attach.SQL |
Attach the PraetorLog and PraetorClassify databases to the named SQL Server. If the SQL Server is not local on the Praetor machine, then the invocation needs to provide the server name as follows: This script also assumes the four Praetor database files (with extensions *.MDF and *.LDF) are located in the main Praetor folder "C:\Program Files\CMS Praetor G2". If your files are located elsewhere you will need to edit this file accordingly. |
Del-30d.SQL |
Delete all entries that are older than 30 days from the normal event, protocol, and archive tables. This is used in the scheduled daily maintenance task that runs at 2am. |
Del-DNSBL.SQL |
Delete all event log entries having the rule name "DNS Blacklist messages". |
Del-RNDR.SQL |
Delete all event log entries having the rule name "Reverse NDR attack solution". |
Detach.SQL |
Detach the PraetorLog and PraetorClassify databases. |
MSDEstats.SQL |
Display the frequency of excessive simultaneous access to MSDE which may indicate attaining the limits of MSDE. This does not apply to the full Microsoft SQL Server. |
MSDEstats-reset.SQL |
Reset the excess simultaneous access frequency count in MSDE. |
Each script is invoked manually from a command prompt by using the OSQL database tool supplied with the Microsoft SQL Server or its free counterpart known as the Microsoft SQL Desktop Engine (MSDE). The invocation is as follows unless the SQL Server is not on the same machine as Praetor, or has a different instance name than default.
OSQL -E -i <SQL-script-filename>
If you need to identify the SQL Server, then invoke as follows.
OSQL -E -S <SQL-Server-name> -i <SQL-script-filename>
To have any script performed during the daily schedule maintenance task, add the appropriate invocation line to the end of the G2-Daily.BAT file immediately following the invocation of the Del-30d.SQL script.