Skip to main content

Software  >  Information Management  >  DB2 Product Family  >  

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.2. (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

Download the source from:
http://www.cpan.org/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.2.tar.gz

perl Makefile.PL
nmake
nmake test
nmake install



Manual installation on Linux

Download the source from:
http://www.cpan.org/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.2.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.1 of the DB2 driver (DBD::DB2) for the Perl Database Interface (DBI) can be downloaded here http://www.cpan.org/authors/id/I/IB/IBMTORDB2/DBD-DB2-1.1.tar.gz



Hints

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

 
 
 
Rate this page
Please take a moment to complete this form to help us better serve you.
This material provides me with the information I need.




This material is clear and easy to understand.




Did the information help you to achieve your goal?
What updates, improvements, or related information would you like to see in this document?
Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.
Input the verification number to submit feedback:
Document information
 Product categories:
 Software
 Data Management
 Data Servers (Database Management Systems)
 DB2 for Linux, UNIX and Windows
 DB2 Programming Interfaces - Scripting Languages- Rexx- Perl
 Operating system(s):
  AIX, HP-UX, Linux, Solaris, Windows
 Software version:
  8, 9.1, 9.5
 Software edition:
  Enterprise Server
 Reference #:
  1297335
 IBM Group:
 Software Group
 Modified date:
 2008-09-23

Translate My Page
 
 

Rate this page

Help us improve this page. Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.