Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBD::DB2 without local instance?

20 views
Skip to first unread message

M. Allan Noah

unread,
Nov 17, 2009, 4:02:27 PM11/17/09
to dbi-...@perl.org
Folks-

Trying to build a 'lightweight' DB2 client on HPUX 11.32 with perl
5.8.8, with IBM z-series linux as the server. I have the client libs
in /opt/IBM/db2/V9.1, and have the DB2_HOME var set to this directory,
and DBD::DB2 builds and installs correctly. I have not installed a new
user or an 'instance' on the client side. A simple test script
produces the dreaded "Failed: Total Environment allocation failure!
Did you set up your DB2 client environment?"

Does DB2 really require a new account and copy of these files be made
as an 'instance', even though I don't want a db installed on the
localhost, and am connecting to the remote without cataloging?

Any experience welcomed.

allan
--
"The truth is an offense, but not a sin"

Praveen

unread,
Nov 18, 2009, 3:53:37 AM11/18/09
to dbi-...@perl.org
Hi Allan,

Check if your DB2INSTANCE environment variable is set correctly to the
instance name to over come this error. Given that you have no need for
a local db on your client machine, you can use the the IBM Data Server
Driver for ODBC CLI package, a small foot print DB2 client (aprox 20
MB) to connect to your DB2 server.

How to setup IBM Data Server Driver for ODBC CLI:

1) Download the package suitable for you platform and the architecture
for which perl is built (32/64 bit).

2) Untar the tar ball downloaded. Say it is placed in directory (/home/
user/clidriver)

3) set the environment variable LD_LIBRARY_PATH to the lib directory
in the location above

export LD_LIBRARY_PATH=/home/user/clidriver/lib

4) Now run you test case using un-cataloged connection

Let me know if you require more information

Thanks

Praveen

M. Allan Noah

unread,
Nov 18, 2009, 10:51:19 AM11/18/09
to Praveen, dbi-...@perl.org
On Wed, Nov 18, 2009 at 3:53 AM, Praveen <prave...@in.ibm.com> wrote:
> Hi Allan,
>
> Check if your DB2INSTANCE environment variable is set correctly to the
> instance name to over come this error.

I don't have an instance on the client machine, do i need the one on the server?

> Given that you have no need for
> a local db on your client machine, you can use the the IBM Data Server
> Driver for ODBC CLI package, a small foot print DB2 client (aprox 20
> MB) to connect to your DB2 server.

The docs state that this is not used for application development. Does
this package still contain the needed headers to compile DBD::DB2?

> How to setup IBM Data Server Driver for ODBC CLI:
>
> 1) Download the package suitable for you platform and the architecture
> for which perl is built (32/64 bit).

I only see a v 9.7 package, but our db is 9.1, is this a problem?

> 2) Untar the tar ball downloaded. Say it is placed in directory (/home/
> user/clidriver)
>
> 3) set the environment variable LD_LIBRARY_PATH to the lib directory
> in the location above
>
> export LD_LIBRARY_PATH=/home/user/clidriver/lib
>
> 4) Now run you test case using un-cataloged connection
>
> Let me know if you require more information

Do I still need the DB2INSTANCE var with this driver? If so, it should
be the instance on the server?

Praveen

unread,
Nov 18, 2009, 12:20:18 PM11/18/09
to dbi-...@perl.org
Hi Allan,

Answers as below,

> I don't have an instance on the client machine, do i need the one on the server?

An instance is required on the client machine, however instance on a
server in unrelated to any instances on the client. Those ( instances
on server and client ) are 2 different entities.

> The docs state that this is not used for application development. Does
> this package still contain the needed headers to compile DBD::DB2?

Could you point me to the docs that you referred to. Yes, the downlaod
link below (missed pasting the link in the previous post) contains
the necessary header files and it is available from version 9.7 only.

Download link:
http://www-01.ibm.com/support/docview.wss?rs=4020&context=SSSNY3&dc=D600&uid=swg21385217&loc=en_US&cs=UTF-8&lang=en

> 1) Download the package suitable for you platform and the architecture
> for which perl is built (32/64 bit).
> I only see a v 9.7 package, but our db is 9.1, is this a problem?

No problems, you can connect to a 9.1 server with V9.7 client.

> 2) Untar the tar ball downloaded. Say it is placed in directory (/home/
> user/clidriver)
>
> 3) set the environment variable LD_LIBRARY_PATH to the lib directory
> in the location above
>
> export LD_LIBRARY_PATH=/home/user/clidriver/lib
>
> 4) Now run you test case using un-cataloged connection
>
> Let me know if you require more information

> Do I still need the DB2INSTANCE var with this driver? If so, it should
> be the instance on the server?

No, DB2INSTANCE setting is not required.

Thanks

Praveen

Praveen

unread,
Nov 19, 2009, 11:14:33 AM11/19/09
to dbi-...@perl.org
Hi Allan,

You will need to use the package IBM Data Server Driver Package. The
same can be downloaded from https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=swg-idsdpds

Thanks

Praveen

M. Allan Noah

unread,
Nov 20, 2009, 8:26:14 AM11/20/09
to Praveen, dbi-...@perl.org
Praveen, I have just built, installed, and tested DBD::DB2 with the
first 'ODBC and CLI' driver you suggested, many thanks for your
support! But now I wonder, what advantage or difference will this
larger 'server driver package' give me?

allan

0 new messages