Here is the environment variables: env DB2INSTANCE = DB2env DB2LIB = C:/Program Files/IBM/SQLLIB/lib/Win32env LD_LIBRARY_PATH = C:/Program Files/IBM/SQLLIB/lib/Win32env LIBPATH = C:/Program Files/IBM/SQLLIB/lib/Win32 and the output from trace 15 New 'DBI::dr' (for DBD::DB2::dr, parent='', id=undef) dbih_setup_handle(DBI::dr=HASH(0x2e4c7c0)=>DBI::dr=HASH(0x2e4c868), DBD::DB2::dr, 0, Null!) dbih_make_com(Null!, 0, DBD::DB2::dr, 176, 0) thr#98a6f8 dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Err, Null!) SCALAR(0x2acff18) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), State, Null!) SCALAR(0x2e11358) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), Errstr, Null!) SCALAR(0x2acff60) (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), TraceLevel, Null!) 0 (already defined) dbih_setup_attrib(DBI::dr=HASH(0x2e4c868), FetchHashKeyName, Null!) 'NAME' (already defined) <- install_driver= DBI::dr=HASH(0x2e4c7c0) >> data_sources DISPATCH (DBI::dr=HASH(0x2e4c7c0) rc1/3 @1 g3 ima801 pid#9476) at c:/strawberry/perl/site/lib/DBI.pm line 1066 via at db2.pl line 35 !! The warn '0' was CLEARED by call to data_sources method -> data_sources for DBD::DB2::dr (DBI::dr=HASH(0x2e4c7c0)~0x2e4c868) thr#98a6f8 Any clues in there on what I have set up wrong? Here is my perl versionThis is perl 5, version 18, subversion 1 (v5.18.1) built for MSWin32-x64-multi-thread
Thanks!Peter My projects: http://www.wire2wire.org/ > Date: Thu, 30 Oct 2014 12:17:19 +0000 > From: tim.bu...@pobox.com > To: three1...@gmail.com > CC: wi...@hotmail.com; dbi-users@perl.org > Subject: Re: First time DBI user crashing perl > > Turning on tracing is usually a good idea when odd things are happening. > Read https://metacpan.org/pod/DBI#TRACING > and set the DBI_TRACE environment variable. > > Tim. > > On Wed, Oct 29, 2014 at 09:56:27PM -0600, Jon wrote: > > Hello Peter, > > > > Well, that's kinda what I figured but never hurts try for the easy > > answer. > > > > I cleaned up your test script a bit. > > > > Can you give this version a try: > > [1]https://gist.github.com/three18ti/c37587ef7d5fb9ee5748 > > > > I'm downloading DB2 as we speak, but I wanted to ask for your DB2_HOME > > environment variable. In your > > instructions it has you set it, but the instructions are clearly for a > > linux server, what did you do on > > your windows server? > > > > Honestly, I have very limited DB2 experience, so it's kinda the blind > > leading the blind here. I'm > > really just curious myself. you're more than welcome to ignore me and > > wait for one of the more > > experienced guys :) > > > > Best Regards, > > Jon A > > On Wed, Oct 29, 2014 at 8:42 PM, Peter Shabino <[2]wi...@hotmail.com> > > wrote: > > > > I am running it from a command prompt and I am getting some of the > > output so perl is running fine. > > Just looks like any command that trys and uses the DB2 interface > > causes a crash. > > Thanks, > > Peter > > > > My projects: > > [3]http://www.wire2wire.org/ > > > > > > -------------------------------------------------------------------------------------------------------- > > > > Date: Wed, 29 Oct 2014 20:26:15 -0600 > > Subject: RE: First time DBI user crashing perl > > From: [4]three1...@gmail.com > > To: [5]wi...@hotmail.com > > CC: [6]dbi-users@perl.org > > > > Hello Peter, > > > > How are you invoking the script? Do you have a perl script that you > > double click? > > > > If so, can you try opening a command/powershell window and running > > your program? You'll likely have to > > specify the full path to the perl binary then pass your script as the > > first parameter. > > > > E.g.: \strawberry\perl\bin\perl.exe [7]my_script.pl > > > > I have not encountered this particular problem with db2 but this is my > > first step when trying to get > > one of my scripts to run in Windows (I'm a Linux enginner by the > > Windows engineers steal a lot of my > > applications), perhaps someone has more specific experience than > > myself. > > > > Best Regards, > > Jon A > > > > On Oct 29, 2014 5:50 PM, "Peter Shabino" <[8]wi...@hotmail.com> wrote: > > > > Try this again I apparently found a keyboard shortcut to send the > > message in hotmail...... > > > > Trying to set up a connection to a remote DB2 server in perl to > > query some data. > > Followed the directions here: > > [9]http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335 > > Then searching the web I came up with this chunk of code: > > use warnings; > > use strict; > > use DBI; > > use DBD::DB2; > > print("Operating System = ",$^O,"\n"); > > print("Perl Binary = ",$^X,"\n"); > > print("Perl Version = ",$],"\n"); > > print("DBI Version = ",$DBI::VERSION,"\n"); > > print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n"); > > print("env = ",$ENV{ DB2INSTANCE},"\n"); > > my @driver_names = DBI->available_drivers; > > print(join("\n",@driver_names),"\n"); > > print("I am here\n"); > > my @dataSources = DBI->data_sources('DB2'); > > print(@dataSources,"\n"); > > print("I am there\n"); > > exit(0); > > When I run this I get a popup that says the "Perl interpreter has > > stopped working" and a button to > > close the program. > > on the console I get: > > Operating System = MSWin32 > > Perl Binary = c:\strawberry\perl\bin\perl.exe > > Perl Version = 5.018001 > > DBI Version = 1.631 > > DBD::DB2 Version = 1.85 > > env = DB2 > > ADO > > DB2 > > DBM > > ExampleP > > File > > Gofer > > ODBC > > Pg > > Proxy > > SQLite > > Sponge > > mysql > > I am here > > So the failure is when I try and get the DB2 data sources... > > Just have no idea even where to start looking for the issue since > > there is no error message. Is > > there a log file with more information on what might have died? > > Thanks, > > Peter > > My projects: > > [10]http://www.wire2wire.org/ > > > > References > > > > Visible links > > 1. https://gist.github.com/three18ti/c37587ef7d5fb9ee5748 > > 2. mailto:wi...@hotmail.com > > 3. http://www.wire2wire.org/ > > 4. mailto:three1...@gmail.com > > 5. mailto:wi...@hotmail.com > > 6. mailto:dbi-users@perl.org > > 7. http://my_script.pl/ > > 8. mailto:wi...@hotmail.com > > 9. http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335 > > 10. http://www.wire2wire.org/