Solved : UNIK Table : itemdef.exe Cannot store document – database has too many unique field names


I recently got this message when trying to replicate a Lotus Notes / XPage database that I had been working on. I had already ticked the “Allow More fields in database” option.

The application does use documents with programmatically generated fields but when I ran some code to count the notesitems in the documents the largest document had 750 fields.

After some time I came across the itemdef.exe application from IBM. This lists the contents of the “UNIK” table in the nsf database. The UNIK table is essentially a list of all of the database fields – and if it is > 64K gets full.

Using this tool showed that although no one document had too many fields there were @30k documents which had a unique programmatically generated field called SCUL-xxxx => the database was trying to manage > 30K fields.

The cause of the problem was using this formula without the quotes on the first parameter


I did find it funny that the culprits initials are clearly recorded 🙂

These are the steps to using to tool :

1. Download it from

2. Extract itemdef.exe to the same place as notes.exe and read the

3. Open a dos window

4. Change Directory to the directory above. in my case cd C:\Program Files (x86)\IBM\Notes

5. Run the command in its most basic form. This will probably show that the UNIK table is full.

>itemdef -b /public/demo/aw-poc/nsf


6. Run the more verbose command but pipe the output to a text file.

>itemdef -f /public/demo/aw-poc/nsf > “D:\output.txt”

This will show you all of the field names and which documents use the fields ( if there are less than 5 )


7. Retrieve the documents using a code similar to that below.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument

Set db = session.currentdatabase
Set doc = db.Getdocumentbyid(“2B01E”)
call doc.putinfolder(“example”,True)








Leave a Reply