Export or Import a Configuration File

Use the export command to create an editable text file from your configuration file. If no configuration file exists, the export command creates a text file with the default configuration settings. After you make your changes, the import command will convert the text file to binary for use with the Client. Text configuration files can only be used with the command-line client.

The export and import commands are typically used from a command line; the Client Console supports only the export command (Export Configuration). When you export the configuration file, the DATABridge Client creates a text file that reflects the current values of the configuration parameters. Any passwords in the file are automatically encoded.

Caution: If you overwrite an existing text configuration file with this file, any comments you had in the previously existing file will be lost. To change or encode a password that was manually entered in a text configuration file, use the password encoding utility from a command line. See Change or Encode a Password.

To export the configuration file for a data source

  • Open a command session and run the following command:

    dbutility [options] export [filename]

    where [filename] is an optional parameter to name a exported file something other than the default (dbridge.ini).

    The exported text file is written to the config subdirectory of the data source's working directory.

    Option

    Description

    -u

    Use this option if you export a text file named dbridge.cfg. This allows the Client to overwrite the existing binary configuration file dbridge.cfg with a text configuration file of the same name.

    For example:

    dbutility -u export dbridge.cfg

To import the configuration file for a data source

Use this procedure to create a binary configuration file from a text client configuration file.

  • Open a command session and run the following command:

    dbutility [options] import [filename]

    where [filename] is an optional parameter to specify a filename other than the default (dbridge.ini). When no option or filename is specified, the import command processes the text file dbridge.ini in the config directory and creates an equivalent binary configuration file, dbridge.cfg, in the same directory. If the file dbridge.ini does not exist in this location, the import command creates a binary configuration file with the default values. If the text file contains errors, the Client returns an error to help you identify the problem and no binary file is created.

    Option

    Description

    -f filename

    Use this option to specify a filename or path other than the default. If this option is omitted, the Client tries to read the file dbridge.cfg in the config directory of the data source's working directory.

    To indicate a different location, type a backslash (Windows) or forward slash (UNIX) followed by the full path, including filename. For example, /home/user/xyz/foo/myconfig.cfg

    -u

    This option is required to allow the existing configuration file to be overwritten with a new file with the same name. Otherwise, the Client will try to read (import) the configuration from a file named dbridge.ini.

    For example, the following command:

    dbutility -u -f dbridge.cfg import

    imports (reads) a file named dbridge.cfg and creates the binary configuration file dbridge.cfg regardless of whether the imported file is a text or binary file.

To export the service configuration file

  • Open a command session and from the Client's global working directory, run the following command:

    dbctrlconfigure export

    This command reads the binary configuration file dbcontrol.cfg in the config directory of the global working directory and creates an editable text configuration file (dbcontrol.ini) in the same location.

To import the service configuration file

  • Open a command session and run the following command:

    dbctrlconfigure import

    This command reads the text configuration file dbcontrol.ini in the config directory of the global working directory and creates a binary configuration file named dbcontrol.cfg in the same location.