c-treeRTG for isCOBOL : Server Startup : ctreesql command-line
ctreesql command-line
ctreesql accepts configuration information from the command-line in addition to the settings and configuration files. Configuration keywords and values listed as command-line arguments take affect before the standard configuration file, ctsrvr.cfg.
All valid configuration file keywords are supported and may be listed on the command-line followed by an appropriate value. No special switch symbols or syntax is required. Simply enter each keyword followed by a value as follows:
ctreesql FUNCTION_MONITOR YES LOCAL_DIRECTORY C:\MYDATA\
To specify the name and location of your server configuration file, ctsrvr.cfg, when launching the c-tree Server from the command-line, use the command-line keyword CTSRVR_CFG followed by a fully qualified configuration file name as follows:
ctreesql CTSRVR_CFG C:\myServer\ctsrvr.cfg
The CTSRVR_CFG command line keyword is typically used when running two Servers on the same machine.
Starting multiple Servers on the same machine
In this example we show how to start two c-tree Server processes listening on different ports on the same machine.
1. Create two configuration files, e.g.
ctsrvr1.cfg:
SERVER_NAME FAIRCOMS1
SERVER_PORT 6661
LOCAL_DIRECTORY ./data1/
ctsrvr2.cfg:
SERVER_NAME FAIRCOMS2
SERVER_PORT 6662
LOCAL_DIRECTORY ./data2/
Note - the two snippets above shows the basic configuration, they should be completed with the rest of settings that usually appear in a c-tree configuration. We notice that different ports and different data folders are referenced in the two configuration files.
2. Start the two processes as follows:
ctreesql CTSRVR_CFG /path/to/ctsrvr1.cfg
ctreesql CTSRVR_CFG /path/to/ctsrvr2.cfg