SnTT: Track delayed adminp requests

Found this IBM Lotus Knowledgebase  Technote # 1298009

The Attachment section in the technote contains a database that contains a “Delayed Processing by Server” view that can be added to your existing admin4.nsf database design. This view provides information about all delayed processing including the following:

  • Requests currently processing
  • What the user acted on
  • What the server request is running on
  • Time request started
  • Total time to perform the request

SnTT: Notes Mail “Inbox Maintenance”

This feature,  introduced with Notes/Domino 8.0, will “clean-up” user mail Inbox folders. In other words, it removes ( not deletes ) documents from the Notes/Domino mail Inbox. The goal is to improve server performance by reducing user mail Inbox size. An Inbox folder with fewer documents performs better because it has fewer documents to index and replicate.

Frequently asked questions are answered in this FAQ. One of the questions is about how the feature works in a mixed environment with 7.x and 8.x mail templates.

The FAQ says that Inbox Maintenace only works with 8.x mail templates. But it is very easy to even enable a 7.x mail template.

The only thing you have to do is to copy the LotusInboxCleanup agent from mail8.ntf to your 7.x template.

The server looks for the existance of the agent and triggers it  if available. Otherwise it will skip databases that do not inherit the agent.

Although the agent is of type scheduled, you do not have to setup a schedule. The agent is invoked by the server.

mb

Settings are on the “Server Tasks -> Administration process” tab of the server document.


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.


Automatically Run An Agent When Server Starts

SnTTYou want an agent to automatically run each time a Lotus® Domino® server starts up. How can this be accomplished?
In version 7.x or earlier you can create a Program document set to run “at startup” in the Domino Directory. For example, on a Windows® platform, the Basics tab of such a Program document would look like:

Program name: nserver
Command line: -c “tell amgr run ‘database_name.nsf’ ‘agent_name'”

Note that both the database name and agent name must be in single quotes.


In Notes 8 there is a new feature in the agent properties.


SnTT: @ServerAccess in LotusScript

SnTT

You can use @ServerAccess to check if a specified user has a specified administrative access level to a server. For a list of keywords to represent the access level you want to check for take a look at the designer help either on your local client or on the web.

But what to do if you want to check the server access level using Lotus Script? The help document does not give you a cross reference to Lotusscript.

In this case, the Evaluate statement is your friend.
For further information about how to use Evaluate I recommend to read the following article on DeveloperWorks: “Simplifying your LotusScript with the Evaluate statement

The following function uses evaluate and @ServerAccess to make the @function available in LotusScript.

Function atServerAccess ( 
sAction As String, sUserName As String, sServerName As String ) As Boolean
  Dim vAccess As Variant
  vAccess = 
   Evaluate(|@ServerAccess(| + sAction + |; "| + sUserName_
                + |"; "| + sServerName + |")|)	atServerAccess = Cbool(vAccess(0))
End Function

Here is a sample of how to call the function

Sub Click(Source As Button)
  Dim sUser As String
  Dim sServer As String
  Dim sAction As String
  sUser = "Bill Gates/Microsoft"
  sServer = "MyServer/foo"
  sAction = "[RemoteAccess]"

  ' returns TRUE of FALSE
  Msgbox atServerAccess ( sAction, sUser, sServer )
End Sub