Configuration Procedures

PxPlus SQL ODBC Driver Configuration (UNIX/Linux)

The local PxPlus SQL ODBC Driver and the Client component of the Client/Server Driver are configured and activated using the license file and the ODBC.ini and ODBCinst.ini files. The license file is installed with the PxPlus SQL ODBC Driver and can be found in the install directory /usr/pxpsqlodbc/ while the ODBC.ini and ODBCinst.ini files are installed as part of unixODBC and can be found in the /etc/ directory.

Note: 
The UNIX/Linux version of the PxPlus SQL ODBC Driver requires that unixODBC be installed to work. For information on unixODBC, see www.unixodbc.org. The 32-bit version of the PxPlus SQL ODBC Driver requires the 32-bit version of unixODBC, and the 64-bit version of the PxPlus SQL ODBC Driver requires the 64-bit version of unixODBC.

(UNIX/Linux support using unixODBC was added in PxPlus 2016.)

For a description of PxPlus UNIX/Linux SQL ODBC Driver components and file locations, see File IO Product Installation and Activation (UNIX/Linux).

Configuration File

To configure the PxPlus SQL ODBC Driver, use a text editor (e.g. vi) to modify (or create a new copy of) the license file. The license.sample file contains documentation at the top of the file on the entries that are required and the syntax of those entries. This file is used to configure the Activation Information and file write settings.

The PxPlus SQL ODBC Driver will run in demo mode if it cannot find the license file or it does not contain a valid activation. A demo activated PxPlus SQL ODBC Driver will notify the user that he is connected to a demo activated product each time it is used and is limited to returning a maximum of 10 records.

The server checks for two entries in the license file:

Activation Information

Activation information for running this software. Enter your activation information as follows:

     serial=xxxxx- y- zzzzzzzzzzzzzzzz

Where:

 

xxxxx

Serial number

 

y

User count

 

zzzzzzzzzzzzzzzz

Activation key

If purchasing a Professional or Web edition of PxPlus that includes PxPlus ODBC support, you must use the SerialNumber, UserCount, and Temporary activation key of your PxPlus Professional or Web License.

If purchasing PxPlus ODBC separately, use the information provided with your purchase.

To run the PxPlus SQL ODBC Driver in demonstration mode, set the serial= entry to a blank value. This will allow use of the PxPlus SQL ODBC Driver with demo messages appearing periodically on the screen.

Write Permissions

The PxPlus SQL ODBC Driver can be read only or it can have write access. To make it read only, remove AllowWriteCmds. If you want to allow write access, add AllowWriteCmds.

Example:

AllowWriteCmds

Configure PxPlus SQL ODBC Driver

An entry for the PxPlus SQL ODBC Driver must be added to the odbcinst.ini file. This lets the UNIX/Linux operating system know about the PxPlus SQL ODBC Driver. The entry should look like the following:

Example:

[PxPlus] 
Description = PxPlus SQL ODBC Driver
Driver         = /usr/lib/libpxpsqlodbc.so
FileUsage   = 1

The driver name and description can be whatever you want. The Driver = field must point to where you copied the libpxpio.so and libpxpsqlodbc.so libraries when you installed the Driver, usually /usr/lib or /usr/lib64.

Configure Data Source Name (DSN)

To use the PxPlus SQL ODBC Driver, a DSN (Data Source Name) must be created. The DSN defines what PxPlus data to access and how to access it.

Create a DSN by adding an entry to the odbc.ini file. The entry should be made up of Connection String Keywords and corresponding settings. The Driver setting is mandatory and should specify the name of the Driver as defined in the odbcinst.ini file. The DSN name and description can be whatever you want. The InstallDir keyword must be defined so that the installation directory can be found.

(InstallDir support was added in PxPlus 2020.)

Defining Local DSN

If using the PxPlus SQL ODBC Driver on local data, you must define either a Data Dictionary file (providex.ddf) and/or an INI file.

If using a Data Dictionary, the Directory setting is required. It contains the path to the directory where the Data Dictionary file (providex.ddf) can be found. This path must not include the name of the data dictionary file. For example, if the providex.ddf file is located at /pxp/data/providex.ddf, then use /pxp/data.

If using an INI file, the IniFile setting is required. It contains both the path and the name of the INI file. For example, if the INI file is located at /pxp/data/mydata.ini, then use /pxp/data/mydata.ini.

Example:

[PxPlusLocalDSN]
Driver=PxPlus
Description=PxPlus ODBC Local DSN
InstallDir=/usr/pxpsqlodbc
Directory=/pxp/data
ViewDLL=/pxp
Debug=1
LogFile=/root/odbc.log
SERVER=NotTheServer

Defining Remote DSN

If using the PxPlus SQL ODBC Driver on remote data, you must define a RemotePVKIOHost and at least one Catalog; otherwise, the server will not start. A maximum number of 256 catalogs may be defined.

Example:

[PxPlusRemoteDSN]
Driver=PxPlus
Description=PxPlus ODBC Remote DSN
Catalog=data
RemotePVKIOHost=192.168.1.164
ViewDLL=/pxp
Debug=1
LogFile=/tmp/odbc.log
SERVER=NotTheServer