This procedure outlines how to properly remove and re-add a database to the Before-After auditing feature in ApexSQL Audit, including manual cleanup of ApexSQL triggers if necessary.
Follow the steps below to ensure proper removal and reconfiguration of a problematic database in the Before-After auditing feature of ApexSQL Audit:
Remove the Database from Before-After Auditing
In the ApexSQL Audit UI, navigate to the Before-After auditing section and remove the problematic database.
Run Cleanup Script on the Problematic Server
Execute the appropriate cleanup script on the SQL Server where the database resides.
Verify Trigger Removal
Run the following query to check whether ApexSQL triggers have been successfully removed:
SELECT * FROM sys.triggers
WHERE name LIKE '%ApexSQL%'
OR (parent_class_desc = 'OBJECT_OR_COLUMN' AND is_disabled = 0)
If the query returns any results, it means some ApexSQL triggers still remain.
Manually Remove Remaining Triggers (If Needed)
Using SQL Server Management Studio (SSMS), manually delete any remaining ApexSQL-related triggers from the database.
Re-add the Database to Before-After Auditing
In the ApexSQL Audit UI, go back to the Before-After auditing section and re-add the cleaned database.