Operating System - Linux
1757825 Members
3003 Online
108865 Solutions
New Discussion

perl dbi, dbd odbc and odbc driver manager

 
Tim Nelson
Honored Contributor

perl dbi, dbd odbc and odbc driver manager

I am in the process of attempting to install some perl modules, specifically the dbi module and some dbd driver.
I have successfully compliled and installed the dbi module but am misunderstanding some pieces of the dbd and odbc drivers and am looking for some clarifications from the experts.
I believe the dbd::odbc is a driver module / interface for odbc connectivity. The compile fails ( perl Makefile.pl) with some notes about an ODBC driver manager is needed.
I assume I am missing something but am looking to understand what it takes to install this module.

Anyone ?

Thanks !!!

Tim
1 REPLY 1
Tim Nelson
Honored Contributor

Re: perl dbi, dbd odbc and odbc driver manager

Keep reading and I find my answer.

Found further down on the page:
http://search.cpan.org/~jurl/DBD-ODBC-1.13/ODBC.pm

What is DBD::ODBC? Why can't I connect? Do I need an ODBC driver? What is the ODBC driver manager?
These, general questions lead to needing definitions.

1) ODBC Driver - the driver that the ODBC manager uses to connect and interact with the RDBMS. You DEFINITELY need this to connect to any database. For Win32, they are plentiful and installed with many applications. For Linux/Unix, some hunting is required, but you may find something useful at:

http://www.openlinksw.com
http://www.easysoft.com
http://www.intersolv.com
http://www.atinet.com/support/openrda_samples.asp
2) ODBC Driver Manager - the piece of software which interacts with the drivers for the application. It "hides" some of the differences between the drivers (i.e. if a function call is not supported by a driver, it 'hides' that and informs the application that the call is not supported. DBD::ODBC needs this to talk to drivers. Under Win32, it is built in to the OS. Under Unix/Linux, in most cases, you will want to use freeODBC, unixODBC or iODBC. iODBC was bundled with DBD::ODBC, but you will need to find one which suits your needs. Please see www.openlinksw.com, www.easysoft.com or www.iodbc.org

3) DBD::ODBC. DBD::ODBC uses the driver manager to talk to the ODBC driver(s) on your system. You need both a driver manager and driver installed and tested before working with DBD::ODBC. You need to have a DSN (see below) configured *and* TESTED before being able to test DBD::ODBC.

4) DSN -- Data Source Name. It's a way of referring to a particular database by any name you wish. The name itself can be configured to hide the gory details of which type of driver you need and the connection information you need to provide. For example, for some databases, you need to provide a TCP address and port. You can configure the DSN to have use information when you refer to the DSN.