RE: DBD::DB2 Error



I finally got past the license issue. It looks as though the DB2 9 I
downloaded off the net was an evaluation copy? I had to go back to DB2
8.2, which I had real a CD copy of. That got rid of the License issue,
but now I seem to have another issue.

It looks like the database name variable value has a limit of 8
character length. Below I've ran the same program twice, changing only
the value of the database variable between runs. You can see the
difference in the error message. The problem is that "USNETAALDSN2" is
the correct value. Going into the DB2 configuration menu I can do a
test of the connection and it works there, my problem is the DB2 driver
seems limited to only 8 characters.


C:\Perl>perl kelen.pl
Operating System = MSWin32
Perl Binary = c:\Perl\bin\perl.exe
Perl Version = 5.008008
DBI Version = 1.53
DBD::DB2 Version = 1.0
Host name = dsn2.prdplexa.sabre.com
Port = 5002
Protocol = TCPIP
Database = USNETAALDSN2

DBI connect('DATABASE=USNETAALDSN2; HOSTNAME=dsn2.prdplexa.sabre.com;
PORT=5002;
PROTOCOL=TCPIP; UID=Z156505; PWD=LUVUNIX0;','Z156505',...) failed:
[IBM][CLI Dr
iver] CLI0124E Invalid argument value. SQLSTATE=HY009 at kelen.pl line
32
Connection failed with error: [IBM][CLI Driver] CLI0124E Invalid
argument value
.. SQLSTATE=HY009 at kelen.pl line 32.



C:\Perl>perl kelen.pl
Operating System = MSWin32
Perl Binary = c:\Perl\bin\perl.exe
Perl Version = 5.008008
DBI Version = 1.53
DBD::DB2 Version = 1.0
Host name = dsn2.prdplexa.sabre.com
Port = 5002
Protocol = TCPIP
Database = DSN2

DBI connect('DATABASE=DSN2; HOSTNAME=dsn2.prdplexa.sabre.com; PORT=5002;
PROTOCO
L=TCPIP; UID=Z156505; PWD=LUVUNIX0;','Z156505',...) failed: [IBM][CLI
Driver] SQ
L30061N The database alias or database name "DSN2 " was
not found
at the remote node. SQLSTATE=08004
at kelen.pl line 32
Connection failed with error: [IBM][CLI Driver] SQL30061N The database
alias or
database name "DSN2 " was not found at the remote node.
SQLSTATE=
08004

C:\Perl>


Brent



________________________________

From: Jonathan Leffler [mailto:jonathan.leffler@xxxxxxxxx]
Sent: Friday, January 26, 2007 2:03 PM
To: Brimacomb, Brent
Cc: dbi-users@xxxxxxxx
Subject: Re: DBD::DB2 Error




On 1/25/07, Brimacomb, Brent <brent.brimacomb@xxxxxxx> wrote:

When attempting to run a program to access a remote DB2
DB, which
resides on a z/Os box, I've receiving the following
error: I've
installed DB2 V9 Windows client. Any one have any
ideas?


C:\Perl>perl kelen.pl
Operating System = MSWin32
Perl Binary = c:\Perl\bin\perl.exe
Perl Version = 5.008008
DBI Version = 1.53
DBD::DB2 Version = 1.0

DBI connect('DATABASE=USNETAALDSN2; HOSTNAME=
dsn2.prdplexa.sabre.com;
PORT=5002;
PROTOCOL=TCPIP; UID=Z156505;
PWD=LUVUNIX0;','Z156505',...) failed:
[IBM][CLI Dr
iver] SQL8002N An attempt to connect to a host failed
due to a missing
DB2 Conn
ect product or invalid license. SQLSTATE=42968
at kelen.pl line 21
Connection failed with error: [IBM][CLI Driver] SQL8002N
An attempt to
connect
to a host failed due to a missing DB2 Connect product or
invalid
license. SQLST
ATE=42968

C:\Perl>



Can you connect to the DB without Perl - from that machine? I'm
not sure what you get that you might use to do the testing, but it looks
as if you can't connect period - and Perl + DBI + DBD::DB2 can't connect
because you can't connect period, rather than because there is a problem
with DBD::DB2 per se. At the least, that would be my starting point -
get Perl + DBI + DBD::DB2 out of the loop and ensure you can connect to
the DB without them. If you can't, maybe you can go to IBM for support
on the installation and configuration of DB2 Connect - no need to
mention DBD::DB2.


--
Jonathan Leffler <jonathan.leffler@xxxxxxxxx> #include
<disclaimer.h>
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."



Relevant Pages

  • DBD DBI Software levels
    ... too clear on the software dependencies of DBD and DBI. ... Are DBD and DBI dependent on the level of perl used to "make" them? ... Are dbd and dbi dependent on the level of the DB2 Application Development ...
    (perl.dbi.users)
  • Antwort: Re: Access into MVS DB2 using DBI or ???
    ... perl to access a DB2 on a mainframe nor on any other operating system. ... On the machine where you run your perl script you need the db2-connection ... > use DBI; ... experience connecting to MVS DB2 so I can't offer any more help here. ...
    (perl.dbi.users)
  • Re: DBI/DBD::DB2
    ... you don't compile a module in the Perl install tree - you compile ... Perhaps the capitalisation of DBD 'DB2' isn't right. ...
    (perl.dbi.users)
  • Using Perl DB2 driver (DBD-DB2) with DB2 UDB Version 8 64bit for AIX 5.2
    ... If you're having problems getting DBD-DB2 to work with 64-bit DB2 UDB ... Cannot load module error when using DB2 Perl driver with DB2 UDB ... Run the following command as root: ... To install the eFix, you can run the following command as root: ...
    (perl.dbi.users)
  • RE: Antwort: Re: Access into MVS DB2 using DBI or ???
    ... > perl to access a DB2 on a mainframe nor on any other operating system. ... I have done nothing with DB2 on my XP machine. ... > of DBI modules. ...
    (perl.dbi.users)