• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2642
  • Last Modified:

Lotus Domino compact the open databases

How can I schedule the activity in the lotus notes in the night so that i will compact all databases including the mail databases in mail/xx.nsf files too if even if it is open. What is the compact command too.?
5 Solutions
From the Domino Administrator Start - Task tool
  1.      From the Domino Administrator click the Server - Status tab.
  2.      Click Server Tasks.
  3.      Open the set of Task tools.
  4.      Click Start.
  5.      In the Start New Task box, select a server task from the list. Select advanced options to specify additional parameters.
  6.      Click Start Task.
In the NOTES.INI file
Many tasks run, by default, at specific times. You can schedule additional tasks to run by editing one of these settings in the NOTES.INI file:
ServerTasks starts tasks automatically every time the server starts up
ServerTasksAt starts tasks at a specified time
In a Program document
To run a task on a server at a regularly scheduled time or at server startup, create a Program document in the Domino Directory. You can also use a Program document to run a UNIX shell script or program, or an API program.
If you create a UNIX shell script or API program, you can use any of these characters for the name: A - Z, 0 - 9, & - . _ ' / (ampersand, dash, period, space, underscore, apostrophe, forward slash). Do not use \ (backslash) or any other characters because this can cause unexpected results.
  1.      From the Domino Administrator, open the Domino Directory. Go to the Servers view, and open the Server document.
  2.      Choose Create - Server - Program.
  3.      On the Basics tab, TYPE       load Compact

Then type fill some another filelds.
Then save and close.
Syntax: Load programname
Description: Loads and starts a specified server task or program on the server. You can start a server add-in program or one that takes a command line for additional data, such as a backup program. The program you run must be on the server's search path.
Use the Load command to run a program until it completes or, if the program runs continually, until you stop the server. Where applicable, you can include arguments that determine how the program runs.
Note  Most server commands support the arguments "-?" and "/?" to display online help. For example, you could enter one of these to obtain help for the server command Load Compact:
Load Compact -?
Load Compact /?
Load Fixup -- Loads and runs the Fixup server task.
Load Object Info OBJECT.NSF -- Loads and runs the Shared Mail Manager and passes along arguments that execute the Info task.
To load a task from the Domino Administrator
You can load a task directly from the Server - Status tab in the Domino Administrator.
  1.      From the Domino Administrator, click the Server - Status tab.
  2.      If necessary, click Tools to display the tool bar, and then click Task - Start.
  3.      Under "Start new server tasks," select the task you want to load.
  4.      (Optional) Uncheck "Show advanced options" if you do not want to specify advanced options. The box is checked by default for tasks which do have additional options.
  5.      Click OK.
Use this method to compact many databases on a server. You can continue using the Domino Administrator during compacting.
  1.      From the Domino Administrator, on the Server pane on the left, select the server on which to run Compact. To expand the pane, click the servers icon.
  2.      Click the Server - Status tab.
  3.      In the Task pane on the right, click Task - Start.
  4.      Select Compactor.
  5.      Do one of the following:
To run Compact with options (to control how Compact runs), click "Show advanced options," click Start Task, select options, and then click OK.
To run Compact without options, click Start Task.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Here is an example program document you can use. Make sure the Notes directory is in your system PATH.

Program name: $COMPACT.EXE
Command line: -S 5
Server to run on: ServerName/Domain
Comments: Compact databases with more than 5 percent whitespace.

Enabled/disabled: ENABLED
Run at times: 10:10 PM each day
Repeat interval of: 0 minutes
Days of week: Wed, Sat

In order to schedule a compact task you should create a Program document in NAB:

Open Domino Administrator (or server's names.nsf) > Configurations > Servers > Programs > Add Program

Program name:
Command line:
    "SubfolderOfData\Production\db.nsf" [compact optional arguments]

Set other fields similar to this:
Run at times:      
     02:00 each day
Repeat interval of:      
     0 minutes
Days of week:      
     Sun, Mon, Tue, Wed, Thu, Fri, Sat

To check out the compact command in detail go here:
Sjef BosmanGroupware ConsultantCommented:
Definitely a Program document. It does what you want in 99.9% of all cases.
jobby1Author Commented:
Will it corrupt the database?

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now