On UNIX and Linux systems, Data Source Names (DSNs) and configuration parameters are set in the odbc.ini file. The default sample odbc.ini file that is installed in the install_directory by the Progress DataDirect product Setup illustrates typical configurations. This file must exist for DataDirect ODBC drivers to operate. For complete details about the odbc.ini file, refer to the chapter "Configuring the product on UNIX/Linux" in the driver's user’s guide.

Your installation program must create or modify a similar system information file using the following procedure:

  1. Your installation program must first create the [ODBC Data Sources] section and then create a section for each DSN.
  2. One line is required in the [ODBC Data Sources] section for each DSN. This line consists of the DSN, followed by an equal (=) sign, followed by the driver name. For example:
    [ODBC Data Sources]
    MongoDB=DataDirect MongoDB
  3. For each DSN listed, your program must create a section named with the DSN, which contains, at a minimum, a Driver= setting to specify the path to the driver. For example:
    [MongoDB]
    Driver=ODBCHOME/lib/ivmongonn.so
    Description=DataDirect MongoDB
    ApplicationUsingThreads=1
    ConfigOptions=
    FetchSize=100
    HostName=
    InitializationString=
    JVMARgs=Xmx256m
    JVMClasspath=
    LoginTimeOut=15
    PortNumber=27017
    ReadOnly=1
    ReadPreference=Primary
    SchemaDefinition=<schema_definition_path>/<file_name_prefix>.config
    ServerPortNumber=19929
    SQLEngineMode=0
    TransactionMode=0
    

    Your installation program can add any additional configuration parameters required by your application. You can also require your users to create these additional entries themselves using a text editor.

  4. You must instruct the user to set the ODBCINI environment variable. This variable specifies the location and name of the odbc.ini file. For example:
    setenv ODBCINI /home/allusers/everyone.odbc.ini

    causes the driver to look for the file named everyone.odbc.ini in the /home/allusers directory.

    The driver first checks the ODBCINI environment variable for the location of the odbc.ini file. If the ODBCINI environment variable has not been set, the driver checks the HOME directory of the user for odbc.ini (a hidden file) and, if it exists, uses it.