8.9. Configure ODBC Options on Red Hat Enterprise Linux
8.9. Configure ODBC Options on Red Hat Enterprise Linux Procedure 8.3. Configure ODBC Options on Red Hat Enterprise Linux Install the driver manager: Verify that your PostGreSQLdriver has installed correctly: To create the DSN, open the configuration file in a text editor: Note You must either use sudo or be logged in as root to open this file. Add the following configuration settings to the file: Save the file and exit the text editor. Run this command to test the DSN: To connect without DSN, use this DSN-less connection string: If you run isql but you encounter an error whereby you see this message: "Can't open lib '/opt/redhat/jboss-dv/v6/psqlodbc/lib64/psqlodbc.so' : file not found" it means that some of the postgres libraries are missing. To fix this issue, run this command as root: yum install postgres To verify that the packages are now installed, run this command: rpm -qa|grep post You should see the postgresql and postgresql-jdbc packages listed.
install unixODBC odbcinst -q -d sudo vi /opt/redhat/odbc.ini [<DSN name>] Driver = /usr/lib/psqlodbc.so Description = PostgreSQL Data Source Servername = <Teiid Host name or ip> Port = 35432 Protocol = 7.4 UserName = <user-name> Password = <password> Database = <vdb-name> ReadOnly = no ServerType = Postgres ConnSettings = UseServerSidePrepare=1 ByteaAsLongVarBinary=1 Optimizer=0 Ksqo=0 Trace = No TraceFile = /var/log/trace.log Debug = No DebugFile = /var/log/debug.log isql <DSN-name> [<user-name> <password>] < commands.sql ODBC;DRIVER={PostgreSQL};DATABASE=<vdb-name>;SERVER=<host-name>;PORT=<port>;Uid=<username>;Pwd=<password>