For Windows environment, the Full version (about 4.0 MB) is recommended and for Unix/Linux platforms the Source version (about 0.5 MB) is needed.
For a Unix/Linux connection, there are three main stages needed. These are:
The iODBC driver manager for Unix/Linux platforms can be downloaded from http://www.iodbc.org by following the “downloads, cvs” link. The PostgreSQL ODBC driver can be downloaded from http://www.postgresql.org/. |
The PostgreSQL driver can be downloaded as a .zip file. Extract the file
psqlodbc.exe to the C:\Program Files\ directory.
In this example, the name of the downloaded zip file was psqlodbc.
Windows already includes an ODBC driver manager, so this does not need to be installed separately.
An ISO C compliant compiler (or ANSI C) must be installed before installation of PostgreSQL.
The iODBC Driver Manager can be downloaded as an rpm file, or for older platform versions, a tar.gz file. You will need to build the driver manager. Download the appropriate file and copy it to your /usr directory. If you have a tar.gz file follow steps 1 to 3 and then continue at step 5, for an rpm file start at step 4.
The PostgreSQL ODBC driver can be downloaded as a tar.gz file. You will need to build the driver manager. Download the appropriate file and copy it to your /usr directory.
The database and the DSN must have the same name, otherwise serious system error may be encountered.
You will also need to find the location of the psqlodbc.so file before starting to create the DSN. This will probably be /usr/lib/psqlodbc.so.
Add the following details to the odbc.inin file:
[ODBC Data Sources] cms = PostgreSQL cms [cms] Description = PostgreSQL cms Driver = /usr/lib/psqlodbc.so Trace = No TraceFile = /tmp/odbc.log Databse = cms UserName = Password = Port = 5432 Protocol = 6.4 ReadOnly = Yes RowVersioning = No ShowSystemTables = No SowOidColumn = No FakeOidIndex = No ConnSettings = |
Edit the following settings in your environment:
HYDRA_DB_DRIVER=odbc SQLSERVER=cms ODBCINI=/etc/odbc.ini |
Each user can have their own odbc.ini file if needed. If you want to test the connection to the database, you can use the ‘odbctest’ tool, provided by iODBC, as well as the ‘testconn’ application in ‘HydraStudio’.