Skip to content

Instantly share code, notes, and snippets.

@adnanzameer
Last active May 25, 2022 13:59
Show Gist options
  • Save adnanzameer/0a90ab98b074879b00331754e2823563 to your computer and use it in GitHub Desktop.
Save adnanzameer/0a90ab98b074879b00331754e2823563 to your computer and use it in GitHub Desktop.
SQL script to empty Episerver trash/recycle bin
DECLARE @pkid int
DECLARE db_cursor CURSOR FOR SELECT pkid FROM tblContent tbl where deleted = 1
OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @pkid
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC [dbo].editDeletePage @PageID = @pkid, @ForceDelete = 1
FETCH NEXT FROM db_cursor INTO @pkid
END
CLOSE db_cursor
DEALLOCATE db_cursor
@ovelartelius
Copy link

Thanks!!!! You saved my day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment