After a big clean up we now have 78000 pages in our waste basket. I wan't to delete these pages and have tried the stored procedure [sp_DeleteOldPages] but after 39 minutes I get a deadlock.
I would like to delete the pages piece by piece to make the queries quicker. It feels like the [sp_DeleteOldPages] procedure can take very very long time.
Now I tried to delete one page with stored procedure editdeletePage with the following code, but all I get is returnvalue=0. the page is not deleted. Why isn't it deleted?
DECLARE @return_value int
EXEC @return_value = [dbo].[editDeletePage] @PageID = 320124, @ForceDelete = 1
SELECT 'Return Value' = @return_value
Why not use the empty recycle bin scheduled service for this? You could also take a peak at the code with reflector to see what it does.