DBD::DB2 Error

DBD::DB2 Error

am 25.01.2007 19:44:27 von brent.brimacomb

------_=_NextPart_001_01C740B0.D7985238
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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?
=20
=20
C:\Perl>perl kelen.pl
Operating System =3D MSWin32
Perl Binary =3D c:\Perl\bin\perl.exe
Perl Version =3D 5.008008
DBI Version =3D 1.53
DBD::DB2 Version =3D 1.0
=20
DBI connect('DATABASE=3DUSNETAALDSN2; =
HOSTNAME=3Ddsn2.prdplexa.sabre.com;
PORT=3D5002;
PROTOCOL=3DTCPIP; UID=3DZ156505; PWD=3DLUVUNIX0;','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=3D42968
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=3D42968
=20
C:\Perl>

Thanks!

Brent Brimacomb CISSP, CISM=20
EDS - Information Security=20
MS 354=20
4000 North Mingo Rd.=20
Tulsa, OK 74116=20
* phone: +01-918-939-6534=20
* mailto:brent.brimacomb@eds.com=20

=20

------_=_NextPart_001_01C740B0.D7985238--

Re: DBD::DB2 Error

am 26.01.2007 21:03:16 von jonathan.leffler

------=_Part_36967_30090652.1169841796857
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 1/25/07, Brimacomb, Brent 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 #include
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."

------=_Part_36967_30090652.1169841796857--

RE: DBD::DB2 Error

am 29.01.2007 18:20:48 von brent.brimacomb

------_=_NextPart_001_01C743C9.D1762BD6
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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.
=20
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.
=20
=20
C:\Perl>perl kelen.pl
Operating System =3D MSWin32
Perl Binary =3D c:\Perl\bin\perl.exe
Perl Version =3D 5.008008
DBI Version =3D 1.53
DBD::DB2 Version =3D 1.0
Host name =3D dsn2.prdplexa.sabre.com
Port =3D 5002
Protocol =3D TCPIP
Database =3D USNETAALDSN2

DBI connect('DATABASE=3DUSNETAALDSN2; =
HOSTNAME=3Ddsn2.prdplexa.sabre.com;
PORT=3D5002;
PROTOCOL=3DTCPIP; UID=3DZ156505; PWD=3DLUVUNIX0;','Z156505',...) =
failed:
[IBM][CLI Dr
iver] CLI0124E Invalid argument value. SQLSTATE=3DHY009 at kelen.pl =
line
32
Connection failed with error: [IBM][CLI Driver] CLI0124E Invalid
argument value
.. SQLSTATE=3DHY009 at kelen.pl line 32.
=20
=20
=20
C:\Perl>perl kelen.pl
Operating System =3D MSWin32
Perl Binary =3D c:\Perl\bin\perl.exe
Perl Version =3D 5.008008
DBI Version =3D 1.53
DBD::DB2 Version =3D 1.0
Host name =3D dsn2.prdplexa.sabre.com
Port =3D 5002
Protocol =3D TCPIP
Database =3D DSN2

DBI connect('DATABASE=3DDSN2; HOSTNAME=3Ddsn2.prdplexa.sabre.com; =
PORT=3D5002;
PROTOCO
L=3DTCPIP; UID=3DZ156505; PWD=3DLUVUNIX0;','Z156505',...) failed: =
[IBM][CLI
Driver] SQ
L30061N The database alias or database name "DSN2 " was
not found
at the remote node. SQLSTATE=3D08004
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=3D
08004
=20
C:\Perl>
=20
=20
Brent
=20


________________________________

From: Jonathan Leffler [mailto:jonathan.leffler@gmail.com]=20
Sent: Friday, January 26, 2007 2:03 PM
To: Brimacomb, Brent
Cc: dbi-users@perl.org
Subject: Re: DBD::DB2 Error
=09
=09


On 1/25/07, Brimacomb, Brent wrote:=20

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?
=09
=09
C:\Perl>perl kelen.pl
Operating System =3D MSWin32
Perl Binary =3D c:\Perl\bin\perl.exe
Perl Version =3D 5.008008
DBI Version =3D 1.53
DBD::DB2 Version =3D 1.0
=09
DBI connect('DATABASE=3DUSNETAALDSN2; HOSTNAME=3D
dsn2.prdplexa.sabre.com;
PORT=3D5002;
PROTOCOL=3DTCPIP; UID=3DZ156505;
PWD=3DLUVUNIX0;','Z156505',...) failed:
[IBM][CLI Dr
iver] SQL8002N An attempt to connect to a host failed
due to a missing=20
DB2 Conn
ect product or invalid license. SQLSTATE=3D42968
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=20
license. SQLST
ATE=3D42968
=09
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.=20
=09
=09
--=20
Jonathan Leffler #include

Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."=20


------_=_NextPart_001_01C743C9.D1762BD6--