Archivprotokoll

  • Hallo zusammen,


    wir haben auf unserem Domino 7.02 seit längerem die Serverseitige Archivierung eingestellt. Läuft gut und ohne Probleme.


    Mich stören nur die Archivprotokolle die kräftig gefüllt werden. Bei aktiven Usern sind das mittlerweile schon 10 oder mehr MB geworden. Wie handhabt ihr das? Löscht ihr die Protokolle manuell oder via Agent oder was micht man richtigerweise mit den Protokollen?


    Vielen Dank schon im voraus.


    Servus
    Sunny

  • Hi @all,


    jetzt versuch ich mich grade an einem Agenten, der mir die entsprechenden Dokumente löscht.


    Dim Session As New NotesSession
    Dim CurrDB As NotesDatabase
    Dim Doc As NotesDocument
    Dim DocDel As NotesDocument
    Dim lView As NotesView
    Dim i As Long

    Set CurrDB = Session.CurrentDatabase
    Set lView = CurrDB.GetView("$All")
    Set Doc = lView.GetFirstDocument


    For i = 0 To lView.EntryCount - 1

    If doc.LastModified <= "01.08.2007" Then
    ' Zeiger muß auf nächstem Doc stehen, sonst LZ-Fehler
    Set DocDel = Doc
    >>> Set Doc = lView.GetNextDocument(Doc)
    Call DocDel.Remove(True)
    Else
    Set Doc = lView.GetNextDocument(Doc)
    End If

    Next i


    Den Code hab ich aus einem anderen Agent kopiert und angepasst. Beim Debuggen läuft er bei der Zeile mit den 3 >>> auf die Fehlermeldung:
    Notes Error: Eintrag im Index nicht gefunden (All by date)


    Kann mir bitte jemand dabeihelfen? Vielen Dank schon im voraus.


    Servus
    Sunny

  • Hi @all,


    so jetzt läufts wie gewünscht:


    Sub Initialize

    Dim ses As New notessession, docs As notesdocumentcollection, db As notesdatabase
    Dim doc As notesdocument, nextdoc As notesdocument
    Set db = ses.currentdatabase
    Set docs = db.unprocesseddocuments
    Set doc = docs.getfirstdocument

    Do Until doc Is Nothing
    Call ses.updateprocesseddoc(doc)
    If ProcessDocument(doc) Then
    ' If ProcessDocument returns True, delete this document.
    Set nextdoc = docs.getnextdocument(doc) ' but first, find out what is the next document we'll need to process.
    doc.remove(True)
    Set doc = nextdoc
    Else
    Set doc = docs.getnextdocument(doc)
    End If
    Loop
    End Sub


    Function ProcessDocument(doc As notesdocument) As Integer


    Dim DatumJetzt As Variant
    Dim Datum2 As Variant

    datumjetzt = Now()
    datum2 = (datumjetzt - 30)
    'Print datum2

    If (doc.Created < datum2) Then
    ProcessDocument = True
    Else
    'Log the error, send email to someone, etc...
    ProcessDocument = False
    End If

    End Function