This section describes how to register ODBC data sources on Linux.
Registering data sources
Edit the odbc.ini definition file for the data source.
Information
Edit the file in the installation directory for the ODBC driver manager (unixODBC)
unixOdbcInstallDir/etc/odbc.ini
Or
Create a new file in the HOME directory
~/.odbc.ini
Point
If unixOdbcInstallDir is edited, these will be used as the shared settings for all users that log into the system. If created in the HOME directory (~/), the settings are used only by the single user.
Set the following content:
Definition name | Setting value |
---|---|
[Data source name] | Set the name for the ODBC data source. |
Description | Set a description for the ODBC data source. Any description may be set. |
Driver | Set the following as the name of the ODBC driver. Do not change this value. Select the two strings below that correspond to the application type. Concatenate the strings with no spaces and then specify this as the driver name. Note The placeholders shown below are enclosed in angle brackets '<>' to avoid confusion with literal text. Do not include the angle brackets in the string.
Example: In a 32-bit application, where the encoding system used by the application is Unicode: "SymfowareServer<symfowareServerClientVersAndLvl>unicode" |
Database | Specify the database name to be connected. |
Servername | Specify the host name for the database server. |
Username | Specify the user ID that will connect with the database. |
Password | Specify the password for the user that will connect to the database. |
Port | Specify the port number for the database server. The default is "26500". |
SSLMode | The setting values for SSLMode are as follows:
|
ReadOnly | Specify whether to set the database as read-only.
|
*1: If specifying either "verify-ca" or "verify-full", use the environment variable PGSSLROOTCERT to specify the CA certificate file as shown below.
Example
export PGSSLROOTCERT=cACertificateFileStorageDir/root.crt
Linux 32-bit
[MyDataSource] Description = SymfowareServer Driver = SymfowareServerV12.1.0ansi Database = db01 Servername = sv1 Port = 26500 ReadOnly = 0
Note
In consideration of security, specify the UserName and the Password by the application.
Environment variable settings
To execute applications that use ODBC drivers, all of the following settings must be configured in the LD_LIBRARY_PATH environment variable:
symfowareServerClientInstallDir/lib
unixOdbcInstallDir(*1)/lib
libtoolInstallDir(*1)/lib
*1: If the installation directory is not specified when unixODBC and libtool are installed, they will be installed in /usr/local.