How to delete old audit data from the database after the upgrade

Email It to Me Print this Page
Question When upgrading from NetWrix Server Configuration Change Reporter 3.0 to NetWrix Windows Server Change Reporter 4.0, the database retention setting available in the new product version will be inapplicable to audit data collected before the upgrade. How do I delete old audit data from the database?
Answer
To delete audit data collected before the upgrade from the database, perform the following steps after the first data collection has run on the monitored servers:
 
  1. Open Microsoft SQL Server Management Studio and connect to the server.
  2. Click New Query and copy-paste the following script into the pane that opens (replace db_name with the actual database name):
USE [db_name]
GO
DECLARE @Date datetime
Select @Date = MIN(Date) from Sessions where IsNull(ManagedObject, N'') <> N''
execute [dbo].[sp_netwrix_DatabaseMaintenance] @Date, 0
GO
 
      3. Execute this script. All audit data collected before the upgrade will be deleted automatically.
(*) Netwrix Auditor replaces former Change Reporter products
Was this information helpful?