Databases Reference
In-Depth Information
DB2 currently provides support for a large number of drivers, including
CLI/ODBC, ADO and OLEDB, JDBC, SQLJ, PERL DBI, and .NET data provider.
CLI/ODBC
As part of the X/Open standard, Call Level Interface (CLI) and Open DataBase
Connectivity (ODBC) standards had the same origin. The ODBC standards
provide a set of interfaces for accessing the database.
DB2 CLI driver can be used on its own to access a DB2 database or as an
ODBC driver. The DB2 CLI driver is an ODBC 3 compliant driver and contains
further functionality that is not specified in ODBC standards. In order to utilize
additional functionality in CLI driver, the application program needs to be linked
directly to CLI driver without the use of the ODBC driver manager.
Perl Database Interface (DBI)
Perl is part of Open Source Standard and is one of the popular choices for use
with Web services through the Common Gateway Interface (CGI). IBM DB2
provides support for Perl Scripts using Database Interface (DBI). DBI provides a
set of standard class methods to access data sources using drivers called
Database Drivers (DBD) . In order to develop Perl application solutions, you
need to obtain Perl, the DBI module, and the DBD:DB2 driver from the
Comprehensive Perl Archive network:
http://www.cpan.org
Building and installing the DBD:DB2 module requires the following:
For Linux and UNIX:
To build and install the DBD::DB2 module, you must have:
-
Perl 5.005_03 or later.
-
DB2 V8 Application Development Client or DB2 9 client.
-
A supported C compiler as documented under “Supported operating
systems” on the Application development Web page.
-
Set the DB2_HOME environment variable to the location of your DB2
instance. For example:
bash# export DB2_HOME=/home/db2inst1/sqllib
-
Install the DBI module:
bash# perl -MCPAN -e 'install DBI'
-
Install the DBD::DB2 module:
bash# perl -MCPAN -e 'install DBD::DB2'
 
Search WWH ::




Custom Search