This module provides access to the administrative functions of DB2 for Linux, Unix and Windows. The administrative functions are those functions not accessible through SQL, which normally require use of the DB2 command line processor (the ``db2'' command). IBM has been making some of these available through administrative view and the SYSPROC.ADMIN_CMD stored procedure.
Using these functions from perl is faster and can provide more detailed results than the command-line processor. For example, when reading configuration parameters, the administrative API will not just tell you which values are set to ``automatic'', but also which options support the ``automatic'' setting. In a similar manner, when loading data into a DPF database, the API returns detailed information for each node and agent, allowing far more fine-grained error handling.
The DB2 administrative function module provides the following functionality:
Operating System DB2 Version Perl Version ================ =========== ============ Solaris 7 (SPARC) 7.2 5.8 Solaris 8 (SPARC) 8.2 5.8 Solaris 10 (SPARC) 9.1 5.8 Solaris 10 (SPARC) 9.5 5.8 Red Hat EL 3 (x86) 8.1 5.8 Red Hat EL 3 (x86) 8.2 5.8 Red Hat EL 3 (x86) 9.1 5.8 Red Hat EL 3 (x86) 9.5 5.8 Red Hat EL 4 (x86_64) 8.2 5.8 Red Hat EL 4 (x86_64) 9.1 5.8 Red Hat EL 4 (x86_64) 9.5 5.8
You need to run the test portions under a userid with DB2 system administration privileges.
Make sure the pre-requisite module Params::Validate has been installed.
As a first step, set the environment variable DB2_VERSION to the DB2 release you have installed. For example, if you're running DB2 Viper (V9.1), do:
export DB2_VERSION=V9.1
If you're not on Linux or Solaris (or if you've installed DB2 in a different location than the Makefile.PL file expects), you also have to specify the path where the DB2 files can be found, for example:
export DB2_PREFIX=/opt/IBM/db2/V9.1
Please report the default prefix for platforms that the author doesn't have access to (i.e. not Linux, Solaris), so the module can support them in the future.
Then do:
perl Makefile.PL make
The test step requires you to create a SAMPLE database with a set of tables used for the export, import and load tests. The supplied ``create_test_db'' script will create the SAMPLE database using the IBM-supplied ``db2sampl'' utility and create some additional tables. Make sure you have sourced the DB2 environment before running the script.
create_test_db make test
You can run the tests against any other database you want, but please make sure you update the CONFIG file before running the test script.
Once the test completes, you can install the module with:
make install
Hildo Biersma <Hildo.Biersma@MorganStanley.com>