1. Connect to the Database using 

Please refer How to install Microsoft SQL Management Studio

Please refer How to Connect to Database use Microsoft SQL Server Management Studio

2. Start a New QueryCopy and Paste the following SQL Script into the New Query

3. Purge audit trail script:

DECLARE @PurgeDate DATE = '2014-12-31' DELETE FROM AuditDataItemPersistent WHERE ModifiedOn <= @PurgeDate DELETE FROM dbo.AuditedObjectWeakReference WHERE Oid NOT IN (SELECT AuditedObject from AuditDataItemPersistent) DELETE FROM dbo.XPWeakReference WHERE Oid NOT IN(SELECT AuditedObject from AuditDataItemPersistent UNION ALL SELECT NewObject from AuditDataItemPersistent UNION ALL SELECT OldObject from AuditDataItemPersistent )

4. Execute the Query


Please refer How to Shrink Database Transaction Log , it another solution to reduce Database Size