Skip to main content

DB2 Perl Database Interface for LUW

Technote (FAQ)


Question

How can my application written in Perl access my DB2 UDB Version 8, 9 and above database for LUW?

Cause

DBI is an open standard application programming interface (API) that provides database access for client applications written in Perl. DBI defines a set of functions, variables, and conventions that provide a platform-independent database interface.

The DBD::DB2 driver works with DBI and a DB2 client to access databases.

The latest release is 1.80. (See below for previous releases.)

README

DBD::DB2 source

Answer

Installing DBD::DB2 with ActivePerl on Windows

If you are using the ActiveState Perl distribution on Windows, you can install a binary version of the DBI and DBD::DB2 modules.

Prerequisites:

  • ActivePerl 5.8 or later
  • DB2 client, Version 8.2 or later

For example, if you have ActivePerl 5.8.7 installed, you can install the DBD::DB2 modules as follows:

  • Install the DBI module by issuing the following command (the DBI module is a prerequisite for the DBD::DB2 module): ppm install DBI
  • Install the DBD::DB2 module by issuing the following command: ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-DB2.ppd (For Version 5.8) ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/DBD-DB2.ppd (For Version 5.10)
  • To uninstall the DBD-DB2 module, issue: ppm uninstall DBD-DB2

When the DBD::DB2 module is successfully installed, you can access documentation and a sample application by issuing the following command:

perldoc DBD::DB2




Manual installation on Windows

Prerequisites:

  • MingW32 and dmake utillity or VC compiler
  • DB2 client, Version 8.2 or later

Download the source from:
http://search.cpan.org/CPAN/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.80a.tar.gz

perl Makefile.PL
dmake (nmake, if using VC compiler)
dmake test (nmake test , if using VC compiler)
dmake install (nmake install, if using VC compiler)



Manual installation on Linux

Download the source from:
http://search.cpan.org/CPAN/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.80a.tar.gz

export DB2_HOME=/home/db2inst1/sqllib (for example)
perl Makefile.PL
make
make test
make install



Previous releases of DBD::DB2

Release 1.79 of the DB2 driver (DBD::DB2) for the Perl Database Interface (DBI) can be downloaded here http://search.cpan.org/CPAN/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.79.tar.gz



What's new in latest release of DBD::DB2
- Fix for Handling for NULL data LOB broken on Perl-5.8.


Download details for getting DB2

Download Express-C V9.7 for free DB2 Express-C

Getting started with DB2 Express-C Getting Started

Support Page for various DB2 V9 downloads Support Downloads

Trial DB2 V9 downloads Trial Downloads

Recommended Fixpacks Download Fixpacks



Hints

For help running Perl with DB2 UDB Version 8 64-bit for AIX 5.2, refer to this technote.

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Document information

DB2 for Linux, UNIX and Windows

DB2 Programming Interfaces - Scripting Languages- Rexx- Perl


Software version:
9.1, 9.5, 9.7


Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows


Software edition:
Enterprise Server, Express, Express-C, Personal


Reference #:
1297335


Modified date:
2011-07-06

Translate my page

Content navigation