SnTT: View Logging – What is it?
View logging is a feature new to Domino 6. It allows views in a database to be transactionally logged.
A new record type is created in the existing transaction log files and incremental view updates are written to the transaction log. Full view rebuilds are not logged.
View logging should be used for views that need to be fully updated immediately after a crash or media recovery. If a Domino server crashes and view indexes need to be rebuilt, they can be incrementally rebuilt quickly from the transaction logs instead of being fully rebuilt manually. This, in essence, reduces server startup time after a crash as well as database access time after media recovery.
View logging is enabled per database view through Domino Designer. By default in Domino 6, view logging is enabled on the $User view of the Domino Directory.
- Go to the database you wish to have transaction logging enabled for and open the database in Designer Client.
- Go to the view you wish to have “View Logging” enable for and go to the “Advance” tab.
- Select “Logging.”
- Check “Include updates in transaction log.”
- Save and close.
Currently there is no way to see which databases have view logging enabled. The administration client only shows “Yes” in the “Is Logged” column if a Domino database is enabled with Transaction logging.
So how can we find out, if view logging is enabled
Unlike other design properties, view transaction logging is not defined in the $Flags field of the Notes database icon design document. If it is enabled, the $LogViewUpdates field is created in the design document representing the view and set to a value of 1.
Worst of all, there is no property in the NotesView Class to determine if view logging is enabled or not.
Here is a piece of code that cycles thru all views of a database and checks if the $LogViewUpdates field is available.
Dim session As New Notessession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim viewdoc As NotesDocument
Forall v In db.Views
Set viewdoc = db.GetDocumentByUNID(v.UniversalID)
If viewdoc.hasitem("$LogViewUpdates") Then
If viewdoc.~$LogViewUpdates(0) = "1" Then
Msgbox "View Logging enabled"
End If
End If
End Forall
I propose, that this should be added as a feature to Declan Lynch’s SuperAdmin database recently released on OpenNTF.org.
If you wantto disable view logging in all views in all databases on a Domino server, read the following technote in the Lotus Software KnowledgeBase.