Progress NLM Server Automation

Greg Smith (gsmith@westnet.com)

Revision History:
1.0 1/30/96 First release

The master source for this FAQ at the moment is my home page

http://www.westnet.com/~gsmith

Updates will get put there first, I may distribute copies by other methods as well. Comments, suggestions, additions, or corrections are best e-mailed to gsmith@westnet.com.

Feel free to distribute this, put it on your FTP site, include links to my page on yours, or otherwise use and abuse it. The only thing I ask is that you make sure to include my name, e-mail address, and home page address if you snip away a part of the document to give to someone; that way they can get a copy of the full document if they want, and I get my additional couple of seconds of fame.

Progress is a trademark of Progress Software Corporation. They can be contacted at (617) 280-4000. NetWare is a trademark of Novell, if they haven't sold that division of the company off yet.

1. Introduction

Progress Software distributes a RDBMS with accompanying 4GL for a number of popular platforms. One of the products they produce lets you host your database on a Novell NetWare server by loading a Progress server NLM (NetWare Loadable Module). This allows the server to run and share resources with an existing NetWare server. Each of the workstations on the NetWare network can run the Progress client program under either DOS or Windows and access this server in a client/server environment.

1.1 Who needs to automate the server programs?

Every site that is running the NLM server should seek some degree of automation. Progress running on the NLM platform requires that the database be shut down in order for it to be backed up. It is possible to backup the database without shutting it down with some backup utilities, but this is potential dangerous; any backup performed in such a way is not guaranteed to be free from errors, and you will find that the backup is unreliable. The only way to ensure that regular backups of your database occur is to automate shutting the server down (usually at off hours), backing it up, and restarting it again. This gives high availability for the database server and maximum reliability for your backup.

1.2 What versions of the software are discussed here?

All of the discussion here relates to the Progress NLM server V6.2M running under NetWare 3.11 or 3.12, as that is the version I have experience automating. Presumably most of the information here still applies for other versions of the software, but I don't have any of them available for testing.

1.3 How does the Progress NLM server work?

The NLM server runs on the NetWare server and communicates with the clients over an IPX/SPX or TCP/IP connection made between the workstations and the server. The version discussed here uses the TLI (Transport Layer Independent) version of the NLM; you can tell if that's the version you have because the startup command on the server will be load _mprotli. Automation with other versions may very well be possible, but again I haven't tested them myself. All the examples I give will use the SPX versions of the commands as I believe this is the more popular way to use the NLM server product.

2. How do you stop a running NLM server?

The easiest way to stop the Progress NLM is to type the shutdown command on the NetWare server console after switching to the NLM control screen (that's the one that lists all the stations logging in and out of the database). Progress also provides a batch file called proshut that will stop a running database server from a client. I have heard that using proshut is a more stable (from a data integrity standpoint) way of shutting the database down then manually stopping it from the console, but I have no way to confirm that. It should theoretically be possible to stop the database server by using the NetWare unload command, but I am not sure if this is a supported solution.

2.1 When stopping the server, how do I stop the pause asking to press a key?

Using the default parameters when starting the server will result in the server process pausing and asking you to press a key before removing the NLM from memory, presumably so you can see the message that the database has been stopped and read the final log information. In order to remove this pause, the command line starting the server should have the -autoexit parameter used.

2.2 How about an example?

Here is the contents of a DOS .BAT batch file that stops two database server processes. Note that the DOS batch call facility is used to call one batch file (proshut) from another batch file (this one).

call proshut -N SPX -db symix -S symix -by
call proshut -N SPX -db symixsch -S sch -by

3. How do I automate starting an NLM server?

NLM servers normally get started by typing the appropriate command at the NetWare server console screen. The first level of automation you can use is to put the startup commands in a NetWare .NCF file. If that .NCF file is in the SYSTEM directory for your system, you can simply type it's name to execute all the lines in the file as if you had typed them from the console.

3.1 How about an example?

The following program is installed on an NLM system in the F:\SYSTEM directory as SYMIX.NCF. By typing in SYMIX on the NetWare console, both NLM servers load automatically. Note the use of the -autoexit parameter; as mentioned in a section above, this allows the server to shut down without user intervention.

load _mprotli symix:\symix\db\symix -N TLI -L 5000 -B 28000 -c 175 -S symix -n 30 -autoexit
load _mprotli symix:\symix\db\symixsch -N TLI -L 5000 -B 2000 -c 175 -S sch -n 30 -autoexit

3.2 How do I start a .NCF file automatically?

There are any number of utilities that let a .NCF file get executed via program control instead of needing to type a command at the console. The freeware program I have used successfully for NetWare 3.11 servers for several years is called Remote Console; a copy of it is available on my WWW site. You install the program on the server, then simply run it with a console command to "type" on the console for you. For the example above, running

RC SYMIX

from a workstation would case the SYMIX.NCF file to get executed on the server. There are a number of programs available that perform this and similar functions discussed in the next section.

4. What programs can schedule the entire process?

4.1 Custom written

All of the tools you need to do NLM automation can be summoned through the DOS batch file language. A simple batch file like this one (using the examples from earlier sectiosn here) illustrates how you could do this sort of things:

:TOP
REM Wait until it's time for backup
REM ...
REM Shutdown databases
CALL proshut -N SPX -db symix -S symix -by
CALL proshut -N SPX -db symixsch -S sch -by
REM Backup program goes here
REM ...
REM Restart database servers
RC SYMIX
GOTO TOP
The main problem is getting this program automatically run at some specific time during the day, i.e. at 5pm every day when the company shuts down. There are a variety of freely available program to do this sort of automatic command timing under DOS (check a popular site like Simtel 20 for them); often you'll find one included with the backup software you use.

I've used two other approaches to scheduling. One has a Progress program run all day, automatically running some lengthy reports throughout the day and night at appropriate times. It quits at 6pm, which then goes to the next line of a batch file with executes commands similar to the ones above. The final line of that batch file logs the scheduling user back in again, which restarts the whole process. The other way I've implemented scheduling involves writing some custom DOS utilities that check for certain things (like is the time between two particular times) and set the DOS errorlevel appropriately; this lets you have looping batch files that exit themselves when certain things occur by looking at the errorlevel output from the programs. I could probably make the source code (it's all in Turbo Pascal) available on my home page if there's any interest in it.

The main disadvantage to the approaches I've given in this section is that they require some scheduling client be logged in all day looking for events to happen. Some of the other programs in the next sections install on the server and let you keep the backup scheduling there. This is impractical for the setups I've dealt with as the backup tape and software is installed on a client instead of the server itself.

4.2 Freely available

4.3 Commercial

There is shareware program called NOVCRON that allows you to schedule running processes on a Novell console. It's supposedly available for download from CompuServe and has been reported to be very successful at automating NLM setups.

I've been told you can use another shareware utility, Phantom of the Console, to do this sort of scheduling as well.

5. Credits

The automation techniques here were developed by myself and Chuck Masters at Old Line Plastics for deployment there and at the original test site for the entire process, an existing NLM server at Kintz Plastics, Inc. An endless collection of people from Progress, Compuserve, and other places contributed minor hints toward putting this solution presented here together in its entirety. Suggestions for other possible solutions were contributed as part of a series of discussions on this topic via the Progress E-Mail Group.