Once a database has been installed that uses ODBC, a connection setup can usually be created using the Querix Connect tool within ‘HydraStudio’.
For a Unix/Linux connection, there are three main stages needed. These are:
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.
gunzip libiodbc-3.51.1.tar.gz
tar xvf libiodbc-3.51.1..tar
cd iodbc-3.51.1.
rpm –i file_name
./configure
The system will carry out a series of configuration functions.make
make install
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.
[ODBC Data Sources] cms = Database_name cms [cms] Description = Database_name cms Driver = /usr/lib/ Database_nameodbc.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'.