Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created February 9, 2014 14:29
Show Gist options
  • Save csharpforevermore/8899829 to your computer and use it in GitHub Desktop.
Save csharpforevermore/8899829 to your computer and use it in GitHub Desktop.
Trim ELMAH database log table. Removes any entries older than 90 days (d = days, 90 = count). Original by Scott Mitchell (founder of 4GuysFromRolla.com)
DELETE FROM [ELMAH_Error]
WHERE TimeUtc < DATEADD(d, -90, getdate())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment