Hello, I am just starting out with DB2 and have come across some problems
with the perl DB2 DBI driver that I'd like to discuss and perhaps find
answers for. First is that the driver seems to be incapable of connecting
to a remote database, or at least it provide the following error when
attempting using the DBI connect method containing the host, port and
database parameters.
DBI connect('database=test;host=192.168.0.8;port=50000','db2inst',...)
failed: [IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=HY009
The second problem is that I don't seem to be able to connect to a 32 bit
instance from a 64-bit PERL and DB2 version. The following error is
returned:
DBI connect('test','db2inst',...) failed: [IBM][CLI Driver] SQL1042C An
unexpected system error occurred. SQLSTATE=58004.
The control centre doesn't work with 64 bit instances so I note which is
why I was trying to work with only 32 bit instances for a test.
Any suggestions on all of this? Remote DB2 connections must be possible as
my employer does it with PERL (I don't get to see the code) :(
Cheers
Serge Rielau - 16 Apr 2006 16:31 GMT
> Hello, I am just starting out with DB2 and have come across some problems
> with the perl DB2 DBI driver that I'd like to discuss and perhaps find
[quoted text clipped - 18 lines]
> Any suggestions on all of this? Remote DB2 connections must be possible as
> my employer does it with PERL (I don't get to see the code) :(
Did you research on developerWorks?
I'm no PERL person myself, but there are some articles on line which may
be helpful. E.g.:
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0512greenstein/
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Joachim Pense - 16 Apr 2006 17:05 GMT
Am Sun, 16 Apr 2006 23:18:05 +0800 schrieb Michael:
> Hello, I am just starting out with DB2 and have come across some problems
> with the perl DB2 DBI driver that I'd like to discuss and perhaps find
[quoted text clipped - 5 lines]
> DBI connect('database=test;host=192.168.0.8;port=50000','db2inst',...)
> failed: [IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=HY009
If you connect remotely, you must explicitly state user and password with
the user and using clauses.
Joachim
Michael - 17 Apr 2006 01:15 GMT
> Am Sun, 16 Apr 2006 23:18:05 +0800 schrieb Michael:
>
[quoted text clipped - 10 lines]
> If you connect remotely, you must explicitly state user and password with
> the user and using clauses.
I cannot seem to find any documentation on this (for perl anyway), could
please point out a documentation or an example for this?
Regards
Joachim Pense - 17 Apr 2006 08:05 GMT
Am Mon, 17 Apr 2006 08:15:10 +0800 schrieb Michael:
>> Am Sun, 16 Apr 2006 23:18:05 +0800 schrieb Michael:
>>
[quoted text clipped - 13 lines]
> I cannot seem to find any documentation on this (for perl anyway), could
> please point out a documentation or an example for this?
That's not Perl, that's DB2. For Perl, I assume you already have the docs
of DBI and of DBD::DB2; I don't think you'll need more.
Joachim
Michael - 17 Apr 2006 11:21 GMT
> Am Mon, 17 Apr 2006 08:15:10 +0800 schrieb Michael:
>
[quoted text clipped - 18 lines]
> That's not Perl, that's DB2. For Perl, I assume you already have the docs
> of DBI and of DBD::DB2; I don't think you'll need more.
Thanks, I've found what I was after. I did not know that a DB2 client was
required for remote databases, and the DB2 module connects to a remote
database through a cataloged database.
Cheers.