Progress
Database Administration
Guide and Reference
ProControl Command-line Interface
In order to start Progress database servers on an NT node, ProControl simply runs the PCCmd command. This image controls either starting or stopping ProService and the various database servers. For the entire syntax of the PCCmd command, see the Progress Startup Command and Parameter Reference .
Within your scripts or script objects, use the following syntax and parameters based on your requirements:
%DLC% is a system-wide environment variable defined during Progress installation. The parameters to
ppcmd.exe
dictate what is done. The following is the list of parameters you will need:P1 - Parameter 1
Use P1 to specify one of the following values for the type parameter:
P2 - Parameter 2
Use P2 to specify one of the following values for the command parameter.
START to start either ProService or the Database Server named in P3.
STOP to stop either ProService or the Database Server named in P3.
STATUS to return one of the following:
[P3] - Parameter 3
Use [P3] to specify a value for the identifier parameter. [P3] is required if Parameter 1 is DATABASE.
If a wrong parameter is passed to PCCmd, it will be signaled to the standard output and no action will be taken.
EXAMPLESSome command-line examples include:
A return of 0 from this call means ProService is already running:
If run while already running, a message displays stating that ProService is already running; otherwise, a successful run will return 0:
If run while already stopped, a message displays stating that ProService is already stopped; otherwise, a successful run will return 0:
A return of 0 from this call indicates the Database server for DEMO is already running:
A return of 0 from this indicates the Database server for DEMO was started successfully. If a start is attempted twice, 0 will still be returned and no message is displayed:
A return of 0 from this indicates the Database server for DEMO was stopped successfully. If a stop is attempted twice or attempted upon a stopped database server, a 1 will be returned and no message is displayed.
Using the above commands, you can create either an entire script to be run or Failover Objects for ProControl and each database server to be placed into a Progress Failover Group.
Determining whether or not to create a script depends on the environment. In the simple case of one database server per cluster, by simply starting and stopping ProService with the database server being automatically started and shutdown by ProService, a script is unnecessary. In this case, using the direct command-line start/stop ProService as the startup and shutdown options to the Failover Object should be used. In the more complicated case of multiple database servers on both nodes, you should use scripts. The scripts can then use the “status” option to determine whether or not ProService is running, as well as determine whether or not a database server is running for the particular object.
NOTE: The Failover Manager is documented to perform startup in the order of the Failover Groups and shutdown in the reverse order of the Failover Groups.Startup of objects within each group is performed in the order listed within the group, while shutdown is executed in reverse order. Therefore, the cluster system manager must properly configure the order so that each Progress database server will have the necessary disk and network objects in place before attempting to start. This becomes especially tricky when dealing with multiple TCP/IP alias objects. The script objects to start and stop the database should be placed into the same group as the TCP/IP alias name for each database server that uses a particular TCP/IP alias name.
ProService Startup/Shutdown Script Examples
The following are examples of scripts that can be used to start and stop ProService. The scripts are stored on a shared disk, which is assigned the drive letter S. The Failover Object is configured to run the scripts for start and stop, respectively:
Specific Database Startup/Shutdown Script Examples
Within ProService startup or shutdown scripts, or within a separate script, once ProService has started, then specific database servers can be started. Conversely, before ProService is shut down, the database servers should be shut down as well.
If you have multiple databases, you might want to create a generic script that can be run with an input parameter for the database name.
The following examples assume that you have set up ProControl to have a database server identified as CluDemo1. (Note it is very important to match the case between the script and ProControl.) If the scripts are contained within the ProService startup/shutdown scripts (either directly or through a reference call), then only one object needs to be added to the Failover Group. However, if they are separate scripts, then multiple objects are needed for each database to be started/shut down by the Failover Group.
The following are code fragments to Start and then Stop the Progress database server for database CluDemo1. The code assumes the same as the Start and Stop ProService examples above with the cluster shared disk as drive letter S:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |