Tip

Scheduled compact of open databases

Here is the ability to schedule/automate the compact of open databases like names.nsf. log.nsf and statrep.nsf. Do you have to compact statrep.nsf on Saturday because you need to bring down the Notes server? I used WinAT to schedule this on a Sunday morning. I created a small CMD file and scheduled that with WinAT. The files I used are from the Resource Kit (sleep.exe, shutdown.exe, winAT.exe).

- Set the NT Schedule service to start automatically. - Copy Sleep.exe , Shutdown.exe and the WinAT files (all from the NT ResourceKit) to c: as well as the cmd file ntdown.cmd. - Modify the ntstart.cmd file to your specific needs (time delays, path descriptions etc.). - Start WinAT and schedule the file c:ntdown.cmd to run at a certain time.

I tested it (I suggest you do that too) and it works just fine.

I had a problem on the spokes (mailservers). When starting the server, Notes client always prompts me to select the ID file. So when the DOS box opened and the compact wants to start, it prompts me for a password of the ID file as well. On the HUB server (where no users connect to, only other servers for mail routing and replication) I did not have that problem.

I had PcAnywhere on the servers. Therefore, I called in from home sometime before the scheduled task, take over the server console with PcAnywhere, start the client, select the server ID and shut down the client again.

It seems that at working hours, the client sessions disturb the last stored used ID setting. In the notes.ini, I did have the two lines: - KeyFilename = ... - ServerKeyFilename = nlschs01.id


code for the file ntdown.cmd:

c:
cd notes
c:\notes\nserver -q
c:
cd\
c:\sleep 10
c:
cd notes
c:\notes\ncompact d:\notes\data\statrep.nsf
c:
cd\
c:\sleep 10
c:
cd notes
c:\notes\ncompact d:\notes\data\log.nsf
c:
cd\
c:\sleep 10
c:
cd notes
c:\notes\ncompact d:\notes\data\names.nsf
c:
cd\
c:\sleep 10
c:\shutdown /L /R /T:60 "Lotus Notes server is rebooting in 1 minute" /Y /C

This was first published in June 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.