FAQ
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>

Thanks!

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

Search Discussions

  • Jonathan Leffler at Jan 26, 2007 at 8:03 pm

    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 <jonathan.leffler@gmail.com> #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."
  • Brimacomb, Brent at Jan 29, 2007 at 5:21 pm
    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
    Sent: Friday, January 26, 2007 2:03 PM
    To: Brimacomb, Brent
    Cc: dbi-users@perl.org
    Subject: Re: DBD::DB2 Error




    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 <jonathan.leffler@gmail.com> #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."

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedJan 25, '07 at 6:45p
activeJan 29, '07 at 5:21p
posts3
users2
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase