Hi,
RIM has removed this procedure from SP5 onwards. For reference here is a copy of the procedure below:
Code:
USE [BESMgmt]
GO
/****** Object: StoredProcedure [dbo].[RemoveDeletedUsers] Script Date: 11/05/2007 13:11:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[RemoveDeletedUsers]
@Days int = 180 as set nocount on declare RemoveDeletedUsers_cursor cursor local for SELECT id from DeletedUserConfig where DATEDIFF(day, DeleteDateTime, GetUtcDate()) > @Days declare @cnt int, @id int,
@total int begin transaction
set @cnt = 0
open RemoveDeletedUsers_cursor
fetch next from RemoveDeletedUsers_cursor into @id
while @@fetch_status = 0
begin
delete from DeletedUserConfig where current of RemoveDeletedUsers_cursor
if @cnt >= 10000
begin
set @cnt = 0
commit transaction
begin transaction
end
else
begin
set @cnt = @cnt + 1
end
fetch next from RemoveDeletedUsers_cursor into @id
end
commit transaction
close
RemoveDeletedUsers_cursor
deallocate RemoveDeletedUsers_cursor
Thanks,
Gary