How do you count Deletion stubs in db?

Hi

I have a scheduled agent that fails while processing documents in a database. The error message is:

“… document deleted …”

Since the agent runs over night, it is extremely unlikely that anyone deletes a document that is being processed. I have lots of error traps in the agent to try and detect the deleted document error (4000) and to try and move on to the next document. However, the agent still fails. In fact it gets stuck in a permanent loop until the agent manager times out.

I’d like to count the number of deletion stubs in the db and see if I can find a correlation between these and the error 4000s reported in the log.

I am surprised that the agent is tripped by the deletion stubs, if that is the problem.

Any ideas how I can count the deletion stubs in a db?

With thanks

Bizhan

Subject: output from console command ‘show database ’ includes deleted doc count

Subject: How do you count Deletion stubs in db?

Look at ytria.com for scanEZ. I’m not affiliated with the company, but I’ve used this the last 6 months and it has proven to be invaluable. There’s a read only trial version and the license is something like $500 for 2 years. The read only alone will allow you to get a count as well as information on your deletion stubs.

HTH

Subject: RE: How do you count Deletion stubs in db?

You can also use NotesPeek to “see” document deletions.

But you may be able to avoid the problem altogether by first checking the IsValid property of each NotesDocument in your code before processing it. For example:

dim nsess as NotesSession

dim ndbSrc as NotesDatabase

dim dclxn as NotesDocumentCollection

dim doc as NotesDocument

dim i as Integer

'{set the required LS objects, etc}

set doc = dclxn.GetFirstDocument()

for i = 1 to dclxn.Count

if doc.IsValid then

'process the document

end if

set doc = dclxn.GetNextDocument(doc)

next i

hth,

dgg

Subject: How do you count Deletion stubs in db?

Many thanks to you all.

Bizhan

Subject: How do you count Deletion stubs in db?

Hi,

if you really want deletion stubs then have a look at the code from Paul Ray at:

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/26c95428bc4e957085256b03007862f2?OpenDocument

Bye

Hynek