Running the database maintenance tool from a Program document

When you run the DBMT tool from a Program document, you can specify additional system databases on which the tool should run, as well as other command line options.

Procedure

  1. Edit the notes.ini file on the server that contains the mail files or databases and make all the following changes:
    1. Remove nUpdall from the ServerTasksAt2 parameter.
    2. Set MailFileDisableCompactAbort=1
      Note: This parameter prevents the router from interrupting the compact operations by delivering mail; delivery restarts after the compact operations complete.
    3. Specify any additional system databases using the notes.ini variable DBMT_FILTER. Separate entries in the list either by a space ( ), a comma (,) or a semi-colon (;). The names are case-insensitive and are relative to the data directory.
      For example, if the data directory is d:\notefile and the database in the root of the data directory is log.nsf, you would enter DBMT_FILTER=log.nsf.
  2. Create a Program document that specifies the dbmt tool runs once at server startup.
  3. Specify the command in the Program document with at least the following options: -compactThreads n -updallThreads n -range starttime stoptime -compactNdays n -force d
    For example, the following set of parameters specifies 8 threads (based on disk drives backing the notes data directory) for both the compact and updall tasks, a window between 2:00 AM and 7:00 AM in which to run the tool, 5 days to wait before compacting non-system databases, and Sunday as the day to perform fixup on databases that cannot be compacted.
    -compactThreads 8 -updallThreads 8 -range 2:00AM 7:00AM -compactNdays 5 -force 1
  4. Specify additional options from the following table.
    Table 1. Command line options for DBMT
    Option Abbreviated syntax Description
    -blacklist <xxx>.ind -bl Prevents compacting of databases specified in an .ind (indirect) file. Specify file names in the .ind file relative to the server data directory.
    -compactNdays n -cnd This option tries to compact all non-system databases every n days.
    -compactThreads -ct Configures the number of threads for performed the database compact operations. Default is 1 thread. If 0 is specified, no compact operations are performed. Base the value selected on the number of disks backing the data directory.
    -force d -f Selects the day of week to perform fixup on databases that may be having issues compacting. If d is 0 (zero), the fixup operation will run any day. Fixup is run only when 5 or more consecutive compact operations fail (and the failure is not due to database in use). The value of d is between 0 and 7 where 1 is Sunday, 2 is Monday, and so on.
    -ftiNdays n -fnd Rebuilds full text indexes every n days. Default is to rebuild them only when they are corrupt.
    -ftiThreads -ft Configures the number of threads for rebuilding of the full text indexes. Default is 1; 0 is not allowed.
    -nocompactlimit -ncl If a compacting limit specified by -range or -timelimit is reached, allows the compacting that is underway to complete but does not begin any new compacting.
    -nounread not available Prevents updates of unread tables during updall operations.
    -ods not available Does copy-style compacting to upgrade database to the ODS level that corresponds to the release of the server if databases are below that level.
    -range starttime stoptime -r This option assumes that a program document is run only on server startup for the DBMT tool. The DBMT tool sleeps until starttime and performs compact operations until stoptime (or all databases have been processed), at which point the DBMT tool sleeps until starttime).
    -stoptime st -st This option assumes that a program document is used to start the dbmt tool every day. The st value specifies at what point compacts should complete. After all processing is complete for all threads, DBMT exits.
    -timeLimit tl -tl New name for compact -x. Restricts the compact time to tl minutes (for all compacts). This option does not apply to updall. It is assumed a program document is used to run the DBMT tool every day. After all processing for all threads has completed, DBMT exits.
    -updallThreads -ut Configures the number of threads for doing the updall operations. Default is 1; 0 is not allowed. Base the value selected on the number of disks backing the data directory.

What to do next

The DBMT tool also allows you to specify a nondiscardable view to Domino®. A nondiscardable view is built by DBMT during updall (if it has not yet been built) and will not be discarded due to inactivity. You can specify nondiscardable views for standard mail templates beginning with Domino 7.0. The standard mail template for HCL Domino 9.0.1 Social Edition is Mail (R9) (mail9.ntf). If you are using an earlier mail template version, see the program data directory for the name of your mail template.
The following are the standard nondiscardable views:
  • $Inbox
  • $Drafts
  • $All
  • ($RepeatLookup)
  • ($ToDo)
  • ($Calendar)
  • ($Haiku_TOC)
  • ($Alarms)
  • ($iNotes)
  • ($Users)
  • ($iNotes_Contacts)
  • ($ThreadsEmbed)

To specify additional views as nondiscardable, use the dbmt_template name NOTES.INI setting in the following format:

dbmt_template name=view_name_or_alias;view_name_or_alias;view_name_or_alias

If you use a custom template, you can add a new template name by using the DBMT_MailTemplate setting, which supports a comma delimited list of template names. Substitute the template name after the underscore, and separate the view or alias names with either semicolons or commas, as shown in the following example:

dbmt_mailtemplate=ModTemp1,ModTemp2

In this example, the databases using the ModTemp1 or ModTemp2 template will have the same nondiscardable views as the standard Domino mail templates (mail9.ntf for example).