Force eliminate deletion Stub

Hello,I have space problems with my database because of the Deletion Stubs. I have change the variable “Remove documents not modified in the last” to 0, but I have not select this option (because I have documents that I don’t want to remove), but my server still keeps these Deletion Stub (I have force the updall task) How can I eliminate these Deletion Stubs

Thanks in advance

Noelia

Subject: Force eliminate deletion Stub

Are you saying that this didn’t work? FWIW, the old technote on how to purge deletion stubs said to set the cutoff date to yesterday (although any date less than the purge age number of days less than today should work) and then close and repoen the db, then paste the old cutoff date back in.

Subject: Force eliminate deletion Stub

Using capi you can delete notes without retaining stubs. So use capi for all your deletion routines.

Hope this helps

Sai

smaganti@dek.com

Subject: RE: Force eliminate deletion Stub

you can use this code in a ( scheduled ) agent to remove the deletion stub :

Option Public

Const wAPIModule = “NNOTES” ’ Windows/32

Declare Private Sub IDDestroyTable Lib wAPIModule Alias “IDDestroyTable” _

( Byval hT As Long)

Declare Private Function IDScan Lib wAPIModule Alias “IDScan” _

( Byval hT As Long, Byval F As Integer, ID As Long) As Integer

Declare Private Function NSFDbOpen Lib wAPIModule Alias “NSFDbOpen” _

( Byval P As String, hDB As Long) As Integer

Declare Private Function NSFDbClose Lib wAPIModule Alias “NSFDbClose” _

( Byval hDB As Long) As Integer

Declare Private Function NSFDbGetModifiedNoteTable Lib wAPIModule Alias “NSFDbGetModifiedNoteTable” _

( Byval hDB As Long, Byval C As Integer, Byval S As Currency, U As Currency, hT As Long) As Integer

Declare Private Function NSFNoteDelete Lib wAPIModule Alias “NSFNoteDelete” _

( Byval hDB As Long, Byval N As Long, Byval F As Integer) As Integer

Declare Private Function OSPathNetConstruct Lib wAPIModule Alias “OSPathNetConstruct” _

( Byval NullPort As Long, Byval Server As String, Byval FIle As String, Byval PathNet As String) As Integer

Declare Private Sub TimeConstant Lib wAPIModule Alias “TimeConstant” _

( Byval C As Integer, T As Currency)

Dim Db As NotesDatabase

Sub Initialize

Dim Session As New NotesSession

Set db = Session.currentDatabase

Call ClearDeletionStubs(db)

End Sub

Sub ClearDeletionStubs(db As NotesDatabase)

Dim ever As Currency, last As Currency

Dim hT As Long, RRV As Long, hDB As Long

With db

	np$ = Space(1024)

	OSPathNetConstruct 0, db.Server, db.FilePath, np$

End With

NSFDbOpen np$, hDB

TimeConstant 2, ever

NSFDbGetModifiedNoteTable hDB, &H7FFF, ever, last, hT

n& = 0

done = (IDScan(hT, True, RRV) = 0)

While Not done

	If RRV < 0 Then

		'Print "Removing "  & Cstr(n&) & " stubs"

		NSFNoteDelete hDB, RRV And &H7FFFFFFF, &H0201

		n& = n& + 1

	End If

	done = (IDScan(hT, False, RRV) = 0)

Wend

IDDestroyTable hT

NSFDbClose hDB

Print  "Deleted " & Cstr(n&) & " stubs"

End Sub

Best regards,

Jacky

Subject: RE: Force eliminate deletion Stub

I have proved this and it works!!Thanks a lot!!

Subject: undocumented feature

Way back in version 3 there was a way to delete your stubs. What you had to do was go to the replication settings, Go to Other. Then change the date on the field for replicate incoming only after a certain date. Bu default it is about 90 days. If you move that up 2 days, then move it back 2 days, all of your deletion stubs would be removed. As with other undocumented features, it may not work any more. But, its worth a try.