By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

Perl and DB2

P: n/a
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
Apr 16 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Michael wrote:
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) :(

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/developerwork...512greenstein/

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Apr 16 '06 #2

P: n/a
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
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


If you connect remotely, you must explicitly state user and password with
the user and using clauses.

Joachim
Apr 16 '06 #3

P: n/a
On Sun, 16 Apr 2006 18:05:25 +0200, Joachim Pense wrote:
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
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


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
Apr 17 '06 #4

P: n/a
Am Mon, 17 Apr 2006 08:15:10 +0800 schrieb Michael:
On Sun, 16 Apr 2006 18:05:25 +0200, Joachim Pense wrote:
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
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


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?


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
Apr 17 '06 #5

P: n/a
On Mon, 17 Apr 2006 09:05:30 +0200, Joachim Pense wrote:
Am Mon, 17 Apr 2006 08:15:10 +0800 schrieb Michael:
On Sun, 16 Apr 2006 18:05:25 +0200, Joachim Pense wrote:
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
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
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?


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.

Apr 17 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.