Configuration Through CLI Utility
The command line interface (CLI) version of configuration provides the same configuration functionality as the property dialogs in Pervasive PSQL Control Center. The CLI Configuration runs on the Windows and Linux platforms supported by Pervasive PSQL v11 SP3.
On Windows, the executable program is bcfg.bat and is installed, by default, in the Program Files directory.
On Linux, the executable program name is bcfg and is located, by default, in the /usr/local/psql/bin directory. The following requirements must be met to run bcfg on Linux.
If you have met the requirements to run bcfg on Linux and still are having difficulty running the utility, refer to the following troubleshooting guide.
See also Pervasive PSQL Account Management on Linux in Getting Started With Pervasive PSQL.
Setting a Configuration
You can configure settings one at a time from the command line or by providing one or more settings in an input file.
*Tip: A convenient way to create an input file is first to create an output file. You can then edit the output file and use the edited version as an input file. See Editing an Input File for the types of edits permissible.
Restarting the Engines
If you use an input file, bcfg prompts you to restart the database engines after the utility processes the file. The restart applies regardless of the settings in the input file. Stopping then starting the engines ensures that the configuration settings take effect.
If you configure a setting from the command line, bcfg prompts you to restart the database engines only if the setting requires a restart.
See Ensuring Configuration Changes Take Effect for how to restart the engines.
Example Scenario: Configuring a Single Setting from the Command Line
Suppose that you want to turn on a configuration setting having to do with reconnecting a client to the server in the event of a network outage. You are not certain about the name of the configuration setting. Complete the following steps.
1
At a command prompt, type bcfg -H reconnect then press Enter.
The utility reports all settings that contain the string “reconnect”:
ID               Setting Name
-----------------------------
29               Enable Auto Reconnect
148              Enable Auto Reconnect
149              Auto Reconnect Timeout
Two of the settings, 29 and 148, look like what you want, but which is which?
2
Type bcfg 29 then press Enter.
The utility reports the following for setting ID 29:
=====================
ENABLE AUTO RECONNECT
=====================
ID: 29
Value: Off
Options: On     Off
Default Value: Off
Description: <Client setting> Specifies if the Client will attempt to reconnect to the Server in the event of a network outage. The reconnected Client will continue processing as if no errors were encountered.
The description tells your that this setting applies to a client and that the setting is currently “off.”
3
Type bcfg 29 on then press Enter.
The utility informs you that system setting 29 has been updated.
4
The utility reports the following for setting ID 29:
=====================
ENABLE AUTO RECONNECT
=====================
ID: 29
Value: On
Options: On    Off
Default Value: Off
Description: <Client setting> Specifies if the Client will attempt to reconnect to the Server in the event of a network outage. The reconnected Client will continue processing as if no errors were encountered.
Note that the value is now set to “on.”
Editing an Input File
An input file must contain at least one complete record for one setting. If you create an input file from an output file and want to remove configuration settings, ensure that the remaining settings are complete records.
At a minimum, a complete record encompasses and ID and Value pair. However, to ensure clarity, it is recommended that you include the top line of the setting header through the setting’s description. For example, here is a suggested minimal record for Enable Auto Reconnect:
=====================
ENABLE AUTO RECONNECT
=====================
ID: 29
Value: On
Options: On    Off
Default Value: Off
Description: <Client setting> Specifies if the Client will attempt to reconnect to the Server in the event of a network outage. The reconnected Client will continue processing as if no errors were encountered.
Other than limiting which setting records are included in the input file, the only other change allowed is to the Value assignments. The assignment can be whatever is specified by Options or by Range.
Command Syntax
bcfg -I inputfile [-S server] [-U username]
[-P password] [-E]
or
bcfg -O outputfile [-S server] [-U username]
[-P password] [-E]
or
bcfg ID [value] [-S server] [-U username]
[-P password]
or
bcfg -H <keyword | ''keyword with spaces''> [-S server]
[-U username] [-P password]
Options
The help search option for a keyword (that is, help for a keyword). The utility searches for configuration settings that contain keyword and returns the ID and setting name, or returns “no matches found.” See also next row in this table.
Note that keyword is case insensitive. However, if the keyword contains one or more spaces, you must double quote the string.
If server is a local machine, the username and password are not required if:
Password used with username to connect to the server. See username. See also Pervasive PSQL Security.
-E
Ignore errors when reading inputfile or writing to outputfile.