Consultor Eletrônico



Kbase 15474: How to automate v7 server startup/shutdown on Windows NT
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
How to automate v7 server startup/shutdown on Windows NT

How to automate v7 server startup/shutdown on Windows NT

Many customers deploying our V7 server on Windows NT want to
automate the server startup and shutdown so that no user
interaction is required. However, Windows NT provides quite
limited support for scheduling things unattended. Since almost
all administration tools are graphical and require user
interaction, there is no easy way to accomplish a totally
automated server environment.

This knowledgebase entry describes how to do that with AT
command scheduler that is included with Windows NT. Kbase 14091
gives instructions how to use Microsoft SRVANY.EXE utility to run
the server as Windows NT service. This document extends that
kbase with instructions how to combine SRVANY with AT.

To be able to use AT you need to have the "Schedule" service
running on NT. To use AT or SRVANY you generally need Administrator
privileges on Windows NT.

Step-by step instructions:
1) Create batch files for server startup and shutdown.
startsrv.bat example:
SET DLC=C:\DLC
SET PATH=%DLC%\BIN;%PATH%
_mprosrv d:\prowork\dbname -N tcp -S servname

stopsrv.bat example:
SET DLC=C:\DLC
SET PATH=%DLC%\BIN;%PATH%
_mprshut d:\prowork\dbname -by

2) To start the server at certain time issue the following command
in command prompt:
AT 11:00 d:\prowork\startsrv.bat
The command should respond with a line like
Added a new job with job ID = 5
To see the entries in the scheduler queue use AT without
any parameters.

3) To shut a server that has been started with AT, you need to run
proshut via AT also. If you do that on command line, it does not
shut down the database. In command prompt type:
AT 11:15 d:\prowork\stopsrv.bat
This command shuts down the server at 11:15.

To run batch processes on a server that has been started with AT,
you need to start the batch process also via AT. Create a batch file
similar to the server startup/shutdown to run the batch process.

It is also possible to combine SRVANY with AT. SRVANY is a utility
that comes with Windows NT resource kit. Refer to the Resource Kit
documentation for more information about SRVANY.

If you have created a service of Progress database server with SRVANY
you can set the database server to start automatically at system
startup without user interaction. It is also possible to set up the
server with SRVANY in a way that you can run proshut or batch
processes directly from command line.

1) Install the database startup as service. In this example SRVANY.EXE
is installed as service name "SrvAny" and runs
d:\prowork\startsrv.bat when it is started. Please note that when
you stop the SrvAny service it does not actually stop the Progress
server. To be able to use proshut or batch processes from command
prompt. set the server to log on the system with an administrative
account instead of the default system account. If you set the
service to use system account, it behaves like a server started
with AT.

2) Test that you can start the database server from Control Panel.
You should be able to shutdown the database from the command
line. If that fails, shut the server via AT or use the WPROSHUT
utility that comes with Progress Windows clients.

3) To start the SrvAny service via AT, create a batch file that
contains the following commands and pass that to AT scheduler:
NET START SrvAny
NET STOP SrvAny
The first line starts the service and the database server, the
second line just stops the SrvAny service but does not actually
bring the database server down. The server can be shut down
either from command line, via AT or over network from a client.

These instructions may seem confusing at first time. The best way
to determine what to do is to try it yourself and see what suits
your needs best. The instructions and testing were done on Windows
NT Workstation 3.51 using Resource Kit v3.51. Starting a database
server with these tools is not QA tested and is not officially
supported by Progress Software. If you encounter problems with
these directions, we will be unable to assist you further.

For more information see Windows NT command reference, System Guide
and Resource Kit documentation.

--
15.02.1996

Progress Software Technical Support Note # 15474