ODBC - Testing odbc.ini in Linux
It is always best to test the ODBC configuration in the odbc.ini externally before doing real work with the database. Before putting the commands right away, below is a brief description about ODBC
ODBC, Open Database Connectivity, objective is to provide a standard API for accessing DBMS. It has 2 parts, the driver manager and the driver.
Driver Manager
It is a layer between the application and the actual driver. It actual functions include resolving DSN (Data Source Name) through the odbc.ini, loading and unloading the actual driver and pass application database calls to the driver.
The common ODBC Driver Manager are
Windows - Microsoft Windows ODBC Driver Manager (odbc32.dll).
Unix - 2 commons Unix Driver Manager are
unixODBC Driver Manager for Unix (libodbc.so). See http://www.unixodbc.org, for more information.
iODBC Driver Manager for Unix (libiodbc.so). See http://www.iodbc.org, for more information.
Driver
It is vendor specific. When the Driver Manager passes the standard database call from the application, it translate to DBMS specific functions and commands to query the designated DBMS.
You could download the driver from the specific database vendor or you can use Easysoft or Datadirect which support large number of databases.
Testing ODBC Connectivity
After creating the DSN entry in your odbc.ini (either in /etc/odbc.ini which need root privilege or user .odbc.ini), you can use the following commands to test the odbc.ini file, assuming that you are using unixODBC driver
isql -v my_dsn myusername mypassword
ODBC, Open Database Connectivity, objective is to provide a standard API for accessing DBMS. It has 2 parts, the driver manager and the driver.
Driver Manager
It is a layer between the application and the actual driver. It actual functions include resolving DSN (Data Source Name) through the odbc.ini, loading and unloading the actual driver and pass application database calls to the driver.
The common ODBC Driver Manager are
Windows - Microsoft Windows ODBC Driver Manager (odbc32.dll).
Unix - 2 commons Unix Driver Manager are
unixODBC Driver Manager for Unix (libodbc.so). See http://www.unixodbc.org, for more information.
iODBC Driver Manager for Unix (libiodbc.so). See http://www.iodbc.org, for more information.
Driver
It is vendor specific. When the Driver Manager passes the standard database call from the application, it translate to DBMS specific functions and commands to query the designated DBMS.
You could download the driver from the specific database vendor or you can use Easysoft or Datadirect which support large number of databases.
Testing ODBC Connectivity
After creating the DSN entry in your odbc.ini (either in /etc/odbc.ini which need root privilege or user .odbc.ini), you can use the following commands to test the odbc.ini file, assuming that you are using unixODBC driver
isql -v my_dsn myusername mypassword
Comments
Post a Comment