March 2, 2009

Notes/Domino Database Compression (Client and Server)

There are several ways to compress the various pieces within the NSF database files. To make full use of these features, you should always upgrade to the newest database file format after the server or client code was successfully updated. Up to 7.0, this was done automatically when the first copy-style compact command was issued (Load Compact -c). Starting with 8.0+ the database file format has to be specified in the notes.ini file (client and server):

- for 8.0: Create_R8_Databases=1
- for 8.5: Create_R85_Databases=1

After this notes.ini parameter is set, you can issue the following command to compress all database on the server or client:

Load Compact -c -ZU -n -v

  • "-c" creates a new replica (copy stype compaction). This is necessary to upgrade the database to a new on-disk-structure (ODS) format.
  • "-ZU" enables the LZ1 compression for attachments (available since 6.5, see note below)
  • "-n" enables the compression of design elements (available since 8.0)
  • "-v" enables the compression of the data part within the documents (available since 8.0.1)
The net savings on the disk usage (and backup space) depends on the database content. You will see savings in the range of 40% up to 55%.

Notes:
  • These NSF compaction options are also fully available on Notes clients. To use the compact command, you need to navigate to the Notes code directory. The Compact command can then be issued on Windows with "NCompact -c -ZU -n -v".
  • There is a problem with the LZ1 compression affecting compressed Java applet code. For further information see the blog entry from Daniel Nashed at
    http://blog.nashcom.de/nashcomblog.nsf/dx/design-compression-issue.htm

  • The new DAOS (Domino Attachment Object Service) feature in the 8.5 code is available only on the Domino server and gives an additional space savings for duplicate attachments on a server.

November 8, 2008

Domino Addin POP3Collect version 0.8.0 available

There is a new version of the Domino Java addin task POP3Collect available on http://NotesNet.CH. Just follow the link under Downloads/Demos.

New features:

  • Scheduling periods may be specified in the Connection documents to allow specific message scheduling times.
  • Send an email to the administrator if a new POP3 Collect version is available. The recipient will be the first entry found in the Administators field of the server document (Security tab).

July 13, 2008

iPhone 3G: Email with Domino IMAP

To fetch your email from a Domino based server to the iPhone 3G, you can use either POP3, IMAP or the Microsoft Exchange protocol. Since there is no native Domino iPhone synchronization, I have decided to use the IMAP protocol over SSL. The following changes are all done in your Domino Directory:

Step 1: Make sure your Domino server has a valid SSL certificate since you should not use IMAP over non-SSL connections.

Step 2: Enable the IMAP SSL port in the server document under Ports... -> Internet Ports... -> Mail


Step 3: Create an Internet site document for the IMAP service if you have enabled the internet site documents in the Domino Directory (and you really should do this). Make sure your keyfile name matches the one created with your server SSL certificate.



Step 4: Create a program document to start the IMAP task at server startup. You could also manually edit the Notes.Ini to add IMAP to the servertasks= line. To test the IMAP server right away, you can use the console command Load IMAP.

Step 5: Configure your firewall(s) to allow incoming TCP connections on port 993.

Step 6: To enable your Domino server to allow authenticated users (such as the iPhone device) to send SMTP mails, you need to change the configuration document under Router/SMTP -> Restrictions and Controls... -> SMTP Inbound Controls



Step 7: Now you can configure your iPhone to use IMAP for mail fetches and SMTP for outgoing emails to your Domino server.

June 24, 2008

Recover from database problems

If you end up with a broken or corrupt Notes database on a server and all the normal database maintenance did not help, these commands in sequence my help you:

  1. Load UpdAll -R path/filename.nsf
    Does a rebuild of all used database views (indices).
  2. Load UpdAll -X path/filename.nsf
    Does a rebuild of the full text index.
  3. Load UpdAll -C path/filename.nsf
    Interestingly, the combination of the two steps 1 and 2 for a second time may help you.
  4. Load FixUp path/filename.nsf
    Check and correct consistency errors.
  5. Load Compact -c -i -L path/filename.nsf
    This command creates a new replica (copy-style compaction), ignores any possible errors and allow other users to access the database.
These database maintenance steps were also recommended by IBM support to correct database problems.

March 29, 2008

Various Domino server cache commands

There are some useful console commands available to display or flush (reset) the various caches used by the Domino server.

Network Connection Cache (since Domino 8.x)

  • NCCache Show to display the network connection cache entries.
  • NCCache Flush to reset (clear) the network connection cache. This command will force the Domino server to newly resolve all used Notes addresses.
Database Cache
  • DBCache Flush to force the cache write outs to disk and to close the database (if possible). This command is mostly useful if you want to close the database for rename or delete at the operating system level.
  • DBCache Show to show the database cache content.
  • DBCache Disable to completely disable the database cache (not recommended). You would need to restart Domino to enable the database cache again.
Name Lookup Cache
  • Show NLCache to show the name lookup cache statistics.
  • Show NLCache Reset to clear (reset) the name lookup. This command is very useful to force the Domino server to reload name lookup data, e.g. after changing the Internet password field in the person documents.

March 27, 2008

Change any field in any Notes document via toolbar button

You may add a button to your toolbar which allows you to change any field of the currently opened document in any Notes application.

First create a new toolbar button with File -> Preferences -> Toolbar Preferences and select Customize -> New Button and fill out the dialog box:



The @-formula code to be pasted into the field Formula is below. Just copy the code between the start and end marker to the dialog box.

---start of code---
List := @DocFields;

DataTypes := "Text":"Date":"Integer":"Password":"Name":"Common Name":"Text Multi Value":"Date Multi Value":"Integer Multi Value":"Name Multi

Value":"Common Name Multi Value":"Action: Remove Field";

EditField := @Prompt([OkCancelList];"Select document field";"Please select the field you wish to change in the currently selected

document:";"CustomerReply";List);

DataType := @Prompt([OkCancelList]:[NoSort];"Select type or action";"Please select the correct data type or action for field <" + EditField + ">";"Text";DataTypes);

RawValue := @If(
@Contains( DataType ; "Name Multi Value" ); @PickList( [Name] );
@Contains( DataType ; "Name" ) ; @PickList( [Name] : [Single] );
DataType = "Action: Remove Field" ; "" ;
@Contains( DataType ; "Multi Value" ); @Prompt( [OkCancelEdit] ; "Set new value"; "Please enter the new value for the field <" + EditField + ">

seperated with : for each value." ; @Abstract([TextOnly] ; 254 ; "" ; @Text( EditField ) ) );
@Prompt( [OkCancelEdit] ; "Set new value" ; "Please enter the new value for the field <" + EditField + ">." ; @Abstract([TextOnly] ; 254 ; "" ;

@Text( EditField) ) ) );

REM {If data conversion doesn't work then don't set field.};
@If(
DataType = "Date" ; @If( @SetField( EditField ; @TextToTime( RawValue ) ) );
DataType = "Integer" ; @If( @IsError( @TextToNumber( RawValue ) ) ; "" ; @SetField( EditField ; @TextToNumber( RawValue ) ) ) ;
DataType = "Common Name" ; @SetField( EditField ; @Name( [CN]; RawValue ) ) ;
DataType = "Password" ; @SetField( EditField ; @Password( RawValue ) ) ;
DataType = "Action: Remove Field" ; @SetField( EditField ; @DeleteField ) ;
DataType = "Text Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ":" ) ) ;
DataType = "Date Multi Value" ; @SetField( EditField ; @TextToTime( @Explode( RawValue ; ":" ) ) ) ;
DataType = "Integer Multi Value" ; @If( @IsError( @TextToNumber( @Explode( RawValue ; ":" ) ) ) ; "" ; @SetField( EditField ; @TextToNumber(

@Explode( RawValue ; ":" ) ) ) ) ;
DataType = "Name Multi Value" ; @SetField( EditField ; @Explode( RawValue ; ":" ) ) ;
DataType = "Common Name Multi Value" ; @SetField( EditField ; @Name( [CN]; @Explode( RawValue ; ":" ) ) );
@SetField( EditField ; RawValue )
);
---end of code---

After you save the dialog box, you will see a new toolbar button. If you press this new button while a document is open in the Notes UI, the first dialog is presented where you need to select the document field to be edited.



In the next dialog you select the field type (or remove field action) to be preformed:



Finally you can edit the fields data:

March 26, 2008

Announcing free Domino Server Addin Task to collect POP3 Messages

This Domino server addin task retrieves messages from POP3 servers and sends them thru SMTP. This allows administrators to centrally collect POP3 messages and route them thru the normal Notes mail router. The function of this task is comparable to standalone tools such as POPBeamer.

This server task is entirely written in Java and should therefore run on any Domino 7 (or higher) server platform or processor architecture. All the neccessary configuration is done in a standard Notes database.



To download this free tool, just follow the link Download/Demos on http://NotesNet.CH

Enjoy !

March 18, 2008

Copy text of Notes dialog box to clipboard

If you need to copy the content of a Lotus Notes dialog box as pure ASCII text into the clipboard, just press the Ctrl-C key while the dialog box is on the screen.

Example of a dialog box:



After pressing Ctrl-C, the Windows clipboard contains

---------------------------
IBM Lotus Notes
---------------------------
Are you sure you want to remove the bookmark 'ABData.CH Homepage'?
---------------------------
Ja Nein
---------------------------

February 25, 2008

Show memory cookie in Internet browsers

In various browsers (such as Firefox), you may display the memory cookies by entering the special URL

Javascript:alert(document.cookie)

Example:

January 30, 2008

Show SMTP mail header

If you would like to see an incoming Internet message in the raw format (including all SMTP header lines), you first need to open the mail in the Notes client. Then you can use the menu View -> Show -> Page Source



This will show the full unformatted message: