If you want to fully remove Audit Trail from the database here are the steps that you need to take.


Note that by removing the Audit Trail SQL Server User from the database and server (step 1), you may fix some issues with Audit Trail connecting to the database



1. Remove the audit user and the corresponding schema and database roles in SQL Server Management Studio.


Under RE7_Test, Security, Users, we deleted AuditUser (and when prompted we deleted the schema)

Under RE7_Test, Roles, Database roles, we delete the role zd_audit


Under the server Security, Logins, we deleted Audit User


2. Run the following SQL to delete entries in the txtstream and txtblock tables:


delete from txtstream where name like  'ZD_Audit:%'

delete from txtstream where name like 'ZD_Audit_All_%'


delete from txtstream where name like 'ZeidmanDeveloment.REAudit%'

delete from txtstream where name like 'ZD.Validatrix%'

delete from txtstream where name like 'REAudit.RegCode%'

delete from txtstream where name like ZD.V.DecodeVersion%'

delete from txtstream where name like 'ZD.VTimetrial.Expired%'

delete from txtstream where name like 'ZD.ATTimetrial.Expired%'


Depending on your configuration not all of these entries will be present so some of the delete statements may not do anything


3. Drop the following tables from the database


ZD_Audit

ZD_Audit_Transaction