Fixes for a Few Lotus Notes Issues

A few years ago, I was an IBM employee and was introduced to their incredibly complex and broken groupware solution known as Lotus Notes/Lotus Domino.

You have to understand that Lotus Notes and Domino are an excellent system for rapidly developing and sharing database applications across large networks. IMHO there was some point where IBM needed a groupware system for handling stuff like messaging, calendars, meetings, contact lists and so on. Storing this information in database files is the most efficient way (when done right) for storing and retrieving that kind of data (Microsoft Exchange and Outlook do this and are extremely fast). Since Lotus Notes/Domino was already a capable database system, they shoe-horned the groupware features onto it. The bolted on features do work but they have many issues. They have continued to bolt on features as newer things (like internet e-mail, instant messaging, and web sites) have become more relevant, resulting in a lot of additional complexity. Although it often appears to be a huge mess, it’s configuration is very flexible and deep down in it’s design there some very intelligent features.

Over the years I learned quite a few little tricks which are quite handy and can make Notes less frustrating when you have to use it daily.

“An Error Occurred While Opening a Windows” When Notes is Launched

This error usually occurs when Lotus Notes is terminated unexpectedly from a crash or the user ending it’s task when it’s locked up. I’ve also seen it appear when Notes Minder (nminder.exe) has been loaded before the Notes (notes.exe) application itself.

Lotus Notes uses quite a few different executables other than just ‘notes.exe’ which work together in the background. When some are still left open from an older session this and other errors can pop up. I suspect that it is because of an important shared DLL which all of the Notes executables use.

Simply open Task Manager and kill off the Notes background processes (ntaskldr.exe nlnotes.exe). If the error persists kill off any other Notes processes, or just reboot the workstation.

Lotus Notes Opens and Immediately Exists Without and Error

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and edit it.

If there are any invalid characters that appear in the file before the “[Notes]” section header, the Notes application will not read the configuration file and will fail to work. Usually Windows Notepad will display a bunch of black boxes to indicate that the character is not part of the regular ASCII range (which Notes expects). Remove any invalid characters you can see, or often it’s better just to delete all of the file contents at the beginning of the file, up to and including the “[Notes]” header, and then just re-type it so there is no way it is corrupt.

Clearing Notes.ini to Set Lotus Notes Back to it’s Original Configuration

The Notes.ini file in the Lotus Notes program folder (usually “C:\Program Files\IBM\Lotus\Notes”) contains the bulk of the core Lotus Notes client configuration (most of the user configuration is stored in separate NSD files). You can open this file up in a text editor like notepad.exe and delete all but the first three or four lines so that it reads:

[Notes]
KitType=1
Directory=C:\Program Files\IBM\Lotus\Notes\Data
InstallType=2

The next time the Notes application is run, it will go through the initial  setup wizard and restore all of the deleted settings with fresh ones that will hopefully work properly. Note that user information like their mail, address book, workspace…even connection documents are all stored in separate NSD databases which are untouched and will be able to work again as soon as the wizard completes.

Create a New Connection Document Using the Server’s IP Address

If your connection documents are broken or if you notice that Lotus Notes is taking a long time searching for servers (by contacting other known servers) , you may have problems with corrupt connection documents.

It is easy to force Lotus Notes to create a new connection document. Bring up the open database dialog (CTRL-O) and paste the server’s IP address into the top (Look In) field. When you hit enter it will create a new set of correct connection documents for that server.

This also can work with servers that are connected to your Lotus Notes client via a passthru server. If the passthru is configured correctly, Notes can contact any of the other Domino servers behind the passthru and obtain the connection information for the server you want to create a connection document for.

Finding Missing Files Using “Add Documents” View

If you’re ever missing a file record that you know should be present in a database but you cannot see in the regular work views, you can always locate it under the “All Documents” view. If the file exists in the database it will appear under this view, you can view it’s properties to find the path if it’s been moved, or confirm if it’s not showing under the regular view (see the date issue below for an example). If it’s not there then it’s really been removed.

Improper Modification Dates on Databases (Future Date Issue)

Sometimes the dates on database files (especially e-mail boxes) become out of sync. When this happens, documents will not appear in the regular views because they have a delivery date which is in the future. They will become visible when the system date reaches the future date that Lotus Notes thinks is the present, however newer documents delivered in the present will continue to be delivered with a future date and will continue to be hidden.

You can spot it by checking the database properties. If it’s modification date is in the future, you have this problem. Database consistency checks (in the GUI or with nfixup.exe) will fail as a result of the bad dates.

I don’t recall the exact explanation of why this occurs, but it does happen in a few ways, and I remember it was often caused as a result of switching time zones under Windows, or from performing date adjustments while Lotus Notes is running. Lotus Notes probably maintains an internal time counter when it’s launched that goes out of sync with the actual system time.

Using NFIXUP.EXE to Perform Consistency Checks

Notes comes with a command line tool named NFIXUP.EXE in it’s program folder which can be used to manually perform consistency checks on database files. It requires the full path to the nsf file, and make sure Notes is closed before you use it.

Performing the check through the command line tools is much faster than checking the files in the Notes GUI, and it provides extra details about the problems fixed or any fatal errors. It sometimes has better success with fixing the files as well.

It should also be noted that templates and layouts are also regular database files, only with a different file extension, so they can be fixed with this tool as well.

Using NCOMPACT.EXE to Compact Databases

When you delete a record or series of items from a Notes database, it doesn’t actually remove the data or resize the database file. It most likely just marks the records or blocks as deleted in a bitmap. When it needs to copy new data into the database, it writes the new data into the blocks and space which were marked as deleted. This increases the performance of the database a lot because it doesn’t have to shift existing data blocks or resize the database file, it just fills the old blocks and updates a few pointers in an internal structure.

However, there may situations where the database file grows to a large size and remains that way, with only a small amount of it’s space actually being used for data. For example, your mail box may have a large number of messages and attachments which makes your mail file over 1GB in size. If you delete all of the messages and attachments, and only receive a couple of messages in the months afterward, you will still have a mail file over 1GB in size (even though it’s almost empty)! Compacting it will remove all of the extra blocks of space in the database which are empty and will never be used.

You can check the percentage of database space actually used against the database file size in the database properties, and compact it from here as well (if you have the permissions).

The command line tool NCOMPACT.EXE will also compact a provided database file, and is often faster at performing the operation from the command line (close Notes first).

Rebuilding Views and Indexes

Indexes speed up searching the database by and it’s beneficial to create one for all of your databases if you can. Indexes can become out-dated or corrupt causing problems. You can delete the old index (if corrupt or really old) and create a new one under the database properties.

Views also use their own indexes and these can also become corrupt and invalid. You can force them to be updated by pressing CTRL-SHIFT-F9.

Moving Records Between Databases With Cut and Paste

You can easily copy selected files/records or all of them into another database file using copy and paste. It is that easy! This is especially handy for doing manual archiving or backing up data from encrypted databases into other database files.

Corrupted Database Templates

This can be an issue when you are suddenly receiving strange errors related to variables or other Lotus Script elements while using the database layout, and it hadn’t been updated or reported the errors when used previously.

Replace the database template with a copy from server. Sometimes you may just have to use one of the generic ones that ships with Notes. Also remember to update the views again as well, since they may cause other errors after a template update/replace.

About these ads

9 Responses to Fixes for a Few Lotus Notes Issues

  1. Jeff says:

    I had an issue with the future timestamp on my contacts file that I could not, for the life of me, figure out how to resolve. Performed a few Google searches and stumbled upon your blog. Thanks for the great tip…it worked!!!

  2. Glad to help you out, although I really didn’t post any solid solution :-P. When I was at IBM they would always have deskside (on site technicians) perform the fix… which was fairly time consuming (from what I had heard).

    I did discover a trick or two in dealing with it. First off, you can try nfscheck on the database file and it can sometimes (rarely) correct it. Most of the time however, it will tell you that the date is too far in the future.

    If your database is in the future by a set amount of time (like 3 days), you can set your system time to match the difference while Notes is running (ie. set the system time 3 days in the future) and Notes will happily download and display your missing messages. In some cases Notes corrects itself when it contacts the Domino server and replicates the database, but usually this will compound the future date issue even further with regards to newer messages. It is a quick fix if you need to view the documents urgently.

    Another thing I would often do would be to simply create a new database file with the proper template (ie. contacts or mail) and then copy and paste all of the documents from the old one into the new one. You can do this easily from the All Documents view. The new file will have the correct date and the documents can be copied over reliably this way (it’s actually better than archiving). The only major difference will be the replication ID (which Domino/Notes uses to unquely identify each database), The different replication ID will be no problem for local databases used by your Notes client (it would be an issue if you have the database is shared and replicated across different servers). Once that is done, quit Notes and rename the old database file with the future dates to something different and the new database file to the name the old one had (ie contacts.nsf), When you open Notes up again it should use the new database file with the proper dates and have no problems displaying the documents. If you do need to access the old database again you can add it to your workspace via CTRL-O and work with it like any regular database (like an archive file) with no effect on the current database Notes is using for your contacts/mail/etc (since the replication ID is different it will not be grouped or replicated along with the new one),

    I’m not sure if that is the same thing Deskside would do (there may be something else lingering in NOTES.INI but I don’t think so from what I’ve seen). If you found a better solution please post it here!

  3. Rony says:

    Hi! one important thing of Lotus Notes is the “Follow Up” option:
    http://runakay.blogspot.com/2011/06/using-follow-up-in-lotus-notes.html

  4. Alver atwater says:

    Hi Keith,

    It’s my pleasure to write a comment on this useful post. Lotus Notes is another good email client used by many peoples across the world. Corruption in NSF database file is an unwanted issues which sometimes can not be fixed easily with the help of inbuilt tools (FIXUP, UPDALL, COMPACT). In such situation a third party program like Stellar Phoenix Lotus Notes Recovery ( http://www.stellarlotusnotesrecovery.com/ ) may help the users to fix the corrupt nsf file.

    thanks
    Alver Atwater

  5. Jagadeesh says:

    Can any one help me out with using ncompact.exe for compacting a nsf file in lotus notes

    Syntaxes used by me are as follows
    cd\
    C:\Lotus\Domino\ncompact.exe -D C:\jaga\Backup\emits.nsf>> C:\jaga\Backup\backup1.log
    When i use the following script and when i check the log its asking for password how to create script file to compact an nsf without asking any passwords

  6. Jagadeesh says:

    Can any one help me out how to use robocopy.exe for copying a particular nsf with an example syntax:Syntax used by meC:\jaga\Robocopy.exe /E /R:1 /W:2 /X /V /IS D:\Data\corp\emits.nsf C:\jaga\Backup >>C:\jaga\Backup\backup.logOutput is as follows:—————————————————————————–ROBOCOPY v 1.54 : Robust File Copy for Windows NT : by kevina@microsoft.com——————————————————————————- Started : Wed Oct 03 01:53:57 2012 Source : D:\Data\corp\emits.nsf\ Dest : C:\jaga\Backup\ Files : *.* Options : *.* /S /E /V /X /IS /R:1 /W:2 ERROR 123 (0x0000007B) Accessing Source Directory D:\Data\corp\emits.nsf\The filename, directory name, or volume label syntax is incorrect.can any one provide me a better syntax using robocopy.exewhile i was able to do it easily using copy but still i want to know how to get it done by using robocopy.exe

  7. Shannon says:

    I am extremely impressed with your writing talents and also with the format on
    your blog. Is this a paid subject matter or did you modify it your self?
    Anyway keep up the nice quality writing, it is rare to
    peer a great weblog like this one these days.
    .

  8. After I originally left a comment I seem to have clicked the -Notify me
    when new comments are added- checkbox and now whenever a comment
    is added I recieve four emails with the exact same comment.
    Is there a means you can remove me from that
    service? Thanks a lot!

  9. Though it is really tough for me to deal with such nonsense corruptions and errors, i always prefer to take back up of NSF file with the help of NSF to PST converter. These days i am using Stellar NSF to PST converter.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: