I want to connect to an Informix database using an ODBC connection from my web server.
Both Informix server and web server are implemented on different machines;
both system are using SuSE Linux.
I know very well how to create an ODBC connection on the same Informix server using unixODBC.
But I don't know how to create an ODBC connection from one Linux based machine to another machine where the Informix server is implemented.
If I use Windows 7 instead of Linux then Windows 7 provides ODBC connection template and there is also no problem in connectivity.
But how to do it with a client PC running Linux OS.
Please guide me.
If you can connect from one Linux machine to Informix database using ODBC then you have installed Informix ODBC client and one of ODBC managers. Such manager can be UnixODBC, Informix own manager or something else. On Linux those managers use odbc.ini and odbcinst.ini configuration files where you configure driver and connection.
Check how it is configured on Linux machine where it works: find those .ini files, check environmet variables (INFORMIXDIR and INFORMIXSQLHOSTS) and find ODBC manager (UnixODBC?). If you use UnixODBC then you can test connection with its isql utility.
Good info abour configuring Informix ODBC client on Linux can be found at: http://www.ibm.com/developerworks/data/library/techarticle/dm-1108odbcdrivermanager/
Related
I'm trying to find a free ODBC driver for Linux to connect my application to an Interbase 2017 database. Tried everything I could think of but still luck. Both the server and the client are using a 64-bit based architecture.
I tried a few firebird ODBC drivers. I managed to use them to connect to firebird databases, but they do not work with the newer versions of Interbase.
I managed to connect to the database by using a paid ODBC driver and it is working, but as long the project is personal and not commercial, I prefer to use a free driver.
I have standard edition sql server on windows and I need to create a linked server to a Maridb database that is in Cent OS (Galera cluster). Maridb ODBC or mySQL odbc doesn't seems to work but these odbc works great for connection to mariadb that are there in another windows server.
Do I need to install anything on linux server or do I need specific ODBC for linux on windows?
I am trying to connect to a customer's DB via ODBC. The ODBC DSN was setup on the the Windows machine. I don't know the path to the DB or the DB name so I have to rely on the DSN.
From what I've seen in general this does not seem to be possible, but I know Pervasive ODBC allows it and seems like MSSQL also allows it.
Question is, does Firebird 2.5 allow this? If it does could you please help me with the connection string
I've set up a Firebird DB on a local windows machine, created an ODBC DSN (and tested the connection locally).
I then tested connections from unixODBC (isql) and python pyodbc and they all connect fine, but I have to specify DB location and name and credentials.
I need to connect to the remote (windows) Firebird ODBC DSN from python 3.6 pyodbc (linux)
What you want isn't possible*. An ODBC DSN exists only on the machine where it is defined. It is basically a connection configuration that is decoupled from your application, and your application references the configuration by a name.
You can't use a DSN remotely (if that were possible, that would be a pretty big security leak). You will need to define a DSN (or use a DSN-less connection string), on your specific machine to be able to use it from that machine.
Given you're using Python, consider using FDB or pyfirebirdsql instead of using pyODBC.
* Or at least, not possible without some middleware service on the remote machine that mediates between your application and the ODBC DSN on the remote machine.
After a lot research, I decided to ask the question here, therefore, I have not found the answer of how I can do this.
I have a system written in C/C ++ which was designed for Linux PowerPC64 BE ( at now, I'm using Debian ) servers, and I need to connect this system to an IBM DB2/400 database, my first choice was to use unixODBC, after searching I saw the need to use a lib. for db2, but I did not find this lib, and then I did not find any other alternatives on how to make that connection.
So, how I can make this connection ?
Linux ODBC drivers for Db2 for IBM i are available in two flavors...
Assuming you have a license for "Client Access", of which the most current incarnation is known as Access Client Solutions (ACS). The Linux ODBC driver is in the Linux Application Package.
IBM also offers a stand-a-lone product, Db2 Connect which provides connectivity to Db2 for Z/OS, DB2 for i, and Db2 for LUW.
For C/C++ you should be good with either. But for instance, the Python Db2 package expects Db2 Connect and doesn't work with the ACS Linux driver.
In windows computer I create a DSN for connecting a PI (from OISoft ) database and pull data in excel and others.
Now how can I make a DSN in linux or can use the DSN already created in that windows PC.
I think you need to refer to your ODBC library vendor's documentation and/or your ODBC driver vendor's documentation for details.
How these things are handled is very much dependent on how the library does it. You might stick a file somewhere or something.
Linux driver managers (unixODBC and iODBC are the free ones) both use the same configuration files: odbc.ini and odbcinst.ini (or .odbc.ini and .odbcinst.ini in your home directory)
odbc.ini is used to list DSNs:
[ODBC Data Sources]
MyDSN=MyDriver
[MyDSN]
Driver=MyDriver
Description=This is my DSN and its settings for connecting to MyDriver.
UID=TheUsername
PWD=ThePassword
SOMEOTHERSETTING=etc
odbcinst.ini is used to list Drivers:
[ODBC Drivers]
MyDriver=Installed
[MyDriver]
Driver=/path/to/driver.so
Description=This is my driver.
Both of these are analogous to the entries in the Windows registry at HKLM/Software/ODBC/ODBC.INI and HKLM/Software/ODBC/ODBCINST.INI so you can go and copy the values from there to setup your DSN in linux.
DSNs are a windows-only concept. There's no equivalent on Linux.