Last active
February 14, 2024 18:16
-
-
Save dsolodow/0e83003a19db69daef28 to your computer and use it in GitHub Desktop.
Delete WSUS Sync History
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM [SUSDB].[dbo].[tbEventInstance] | |
WHERE [EventID] IN (381,382,384,386) |
@gsaldana71, try this for one last week:
DELETE FROM [SUSDB].[dbo].[tbEventInstance] WHERE ([EventID]=381 or [EventID]=382 or [EventID]=384 or [EventID]=386 or [EventID]=387) and TimeAtServer < (DATEADD (week , -1 , getdate() ))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! This worked beautifully. I tried others but this one did the trick. Do you have one that leaves the most recent synchronizations??