(Fwd) Help in installing DBD - DB2 for Perl
- Forwarded message from raghav sridharan raghava...@yahoo.co.in - Date: Wed, 2 Jun 2010 06:56:01 +0530 (IST) From: raghav sridharan raghava...@yahoo.co.in To: tim.bu...@pobox.com Subject: Help in installing DBD - DB2 for Perl X-Mailer: YahooMailRC/374.4 YahooMailWebService/0.8.103.269680 HelloTim, I am trying to install DBD-DB2 using the command ppm install DBD-DB2.ppd But I am getting the below error: ppm install failed The PPDdoes not provide code to install for this platform Can you please help ? Thanks Raghav - End forwarded message -
Make Test Failed For DBD-Oracle 1.24
Hi, I have problem when I run make test for DBD::Oracle 1.24 module. My Oracle database is on remote server. Oracle database version is 10g, and my Oracle client is version 10.2 (64bit) on HP-UX 11.11(PA-RISC) 64bit OS. I can run splplus to connect to remote database. My perl is version 5.8.3. My DBI version is 1.611. perl Makefile.PL -l and make command completed without error. However, make test failed. Please refer the below output and maketest.log in attachment. # perl Makefile.PL -l Using DBI 1.611 (for perl 5.008003 on PA-RISC1.1-thread-multi) installed in /opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi/auto/DBI/ Configuring DBD::Oracle for perl 5.008003 on hpux (PA-RISC1.1-thread-multi) Remember to actually *READ* the README file! Especially if you have any problems. Installing on a hpux, Ver#11.00 Using Oracle in /opt/oracle/product/10.2.0/client_1 DEFINE _SQLPLUS_RELEASE = 1002000100 (CHAR) Oracle version 10.2.0.1 (10.2) Found direct-link candidates: libclntsh.sl Oracle sysliblist: -lrt -lpthread -l:libnss_dns.1 -lnsl Found header files in /opt/oracle/product/10.2.0/client_1/rdbms/public. Your LD_LIBRARY_PATH env var is set to '/opt/oracle/product/10.2.0/client_1/lib' WARNING: Your LD_LIBRARY_PATH env var doesn't include '/opt/oracle/product/10.2.0/client_1/lib32' but probably needs to. WARNING: If you have trouble, see README.hpux.txt... you may have to build your own perl, or go hunting for libraries Checking for functioning wait.ph System: perl5.008003 hp-ux bertha b.11.00 u 9000800 136901587 unlimited-user license Compiler: cc -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 Linker: /usr/bin/ld Sysliblist: -lrt -lpthread -l:libnss_dns.1 -lnsl Linking with -lclntsh. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -l:libnss_dns.1 LD_RUN_PATH=/opt/oracle/product/10.2.0/client_1/lib32 Using DBD::Oracle 1.24. Using DBD::Oracle 1.24. Using DBI 1.611 (for perl 5.008003 on PA-RISC1.1-thread-multi) installed in /opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi/auto/DBI/ Writing Makefile for DBD::Oracle *** If you have problems... read all the log printed above, and the README and README.help.txt files. (Of course, you have read README by now anyway, haven't you?) Refer my perl version: # perl -V Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC1.1-thread-multi uname='hp-ux bertha b.11.00 u 9000800 136901587 unlimited-user license ' config_args='-ders -Dcc=cc -Accflags=-DNO_HASH_SEED -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Dd_attribut=undef -Dd_u32align=define -Darchname=PA-RISC1.1 -Doptimize=-fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -Duselargefiles -Dinc_version_list=5.8.2/$archname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname 5.8.0 -Duseshrplib -Dprefix=/opt/perl -Dcf_by=ActiveState -dcf_email=supp...@activestate.com' mailto:-dcf_email=supp...@activestate.com' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags =' -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ', optimize='-fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0', cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED' ccversion='B.11.11.10', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/usr/bin/ld', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib /usr/local/lib libs=-lcres -lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc perllibs=-lcres -lnsl -lnm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc libc=/lib/libc.sl, so=sl, useshrplib=true, libperl=libperl.sl gnulibc_version='' Dynamic Linking: dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred ' cccdlflags='+Z', lddlflags='-b +vnocompatwarnings' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: ActivePerl Build 809 22218 Remove the caveat
DBD::Oracle and bulk operations
Hi! Since I came into this topic while writing a script: What does DBD::Oracle know about bulk operations? In PL/SQL you can speed up your cursor loops by using bulk fetches and/or bulk updates/inserts. Instead of operating on single rows you use arrays of rows. Since DBI does not support it directly (from what I know), it could be used when doing select_all_xxx calls. Sounds simple, and, yes, I know, it is not as easy as it sounds. But I think it would speed up this calls. PL/SQL gets a boost by 5 to 10, depending on hardware, OS and other things. When you search for DBD::Oracle and bulk, google only comes up with rather old documents dating back to 2004 and 2003. In one of those (from this mailinglist) I found: It is not part of DBD::Oracle yet, though there are plans to include it in a future version. I'm a regular reader of this mailing list and I wonder that this topic did not come up again in recent years - or I just missed it ... cu hannes -- Johannes Gritsch Unix consultant and Oracle trainer Vienna, Austria
Re: DBD::Oracle and bulk operations
Johannes Gritsch wrote: DBI does support bulk operations and what you are asking about is the array interface. It does it though the 'execute_array' http://search.cpan.org/~timb/DBI-1.611/DBI.pm#execute_array method. and it is available to all DBD drivers. DBD::Oracle is special as it implements its own version of it that takes advantage of Oracle's array interface. It has been in there since 1.18. here is an example of its use my @in_values=('1',2,'3','4',5,'6',7,'8',9,'10'); my @status; my $sth = $dbh-prepare(qq( INSERT INTO foo (id, bar) VALUES (foo_id_seq.nextval, ?))); $sth-bind_param_array(1,\...@in_values); $sth-execute_array({ArrayTupleStatus=\...@status}); I have never done a full speed test but with 1.17 it took about 25min to insert 2 million records using the same code and 1.18 it took only about 6 min. hope this helps cheers John Hi! Since I came into this topic while writing a script: What does DBD::Oracle know about bulk operations? In PL/SQL you can speed up your cursor loops by using bulk fetches and/or bulk updates/inserts. Instead of operating on single rows you use arrays of rows. Since DBI does not support it directly (from what I know), it could be used when doing select_all_xxx calls. Sounds simple, and, yes, I know, it is not as easy as it sounds. But I think it would speed up this calls. PL/SQL gets a boost by 5 to 10, depending on hardware, OS and other things. When you search for DBD::Oracle and bulk, google only comes up with rather old documents dating back to 2004 and 2003. In one of those (from this mailinglist) I found: It is not part of DBD::Oracle yet, though there are plans to include it in a future version. I'm a regular reader of this mailing list and I wonder that this topic did not come up again in recent years - or I just missed it ... cu hannes
RE: Make Test Failed For DBD-Oracle 1.24
Never ran into that myself but this link looks like the same error http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1272030523151+28353475threadId=1078200 cheers John Subject: Make Test Failed For DBD-Oracle 1.24 Date: Tue, 1 Jun 2010 19:04:44 +0800 From: pbk...@motorola.com To: dbi-users@perl.org Hi, I have problem when I run make test for DBD::Oracle 1.24 module. My Oracle database is on remote server. Oracle database version is 10g, and my Oracle client is version 10.2 (64bit) on HP-UX 11.11(PA-RISC) 64bit OS. I can run splplus to connect to remote database. My perl is version 5.8.3. My DBI version is 1.611. perl Makefile.PL -l and make command completed without error. However, make test failed. Please refer the below output and maketest.log in attachment. # perl Makefile.PL -l Using DBI 1.611 (for perl 5.008003 on PA-RISC1.1-thread-multi) installed in /opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi/auto/DBI/ Configuring DBD::Oracle for perl 5.008003 on hpux (PA-RISC1.1-thread-multi) Remember to actually *READ* the README file! Especially if you have any problems. Installing on a hpux, Ver#11.00 Using Oracle in /opt/oracle/product/10.2.0/client_1 DEFINE _SQLPLUS_RELEASE = 1002000100 (CHAR) Oracle version 10.2.0.1 (10.2) Found direct-link candidates: libclntsh.sl Oracle sysliblist: -lrt -lpthread -l:libnss_dns.1 -lnsl Found header files in /opt/oracle/product/10.2.0/client_1/rdbms/public. Your LD_LIBRARY_PATH env var is set to '/opt/oracle/product/10.2.0/client_1/lib' WARNING: Your LD_LIBRARY_PATH env var doesn't include '/opt/oracle/product/10.2.0/client_1/lib32' but probably needs to. WARNING: If you have trouble, see README.hpux.txt... you may have to build your own perl, or go hunting for libraries Checking for functioning wait.ph System: perl5.008003 hp-ux bertha b.11.00 u 9000800 136901587 unlimited-user license Compiler: cc -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 Linker: /usr/bin/ld Sysliblist: -lrt -lpthread -l:libnss_dns.1 -lnsl Linking with -lclntsh. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -l:libnss_dns.1 LD_RUN_PATH=/opt/oracle/product/10.2.0/client_1/lib32 Using DBD::Oracle 1.24. Using DBD::Oracle 1.24. Using DBI 1.611 (for perl 5.008003 on PA-RISC1.1-thread-multi) installed in /opt/perl/lib/site_perl/5.8.3/PA-RISC1.1-thread-multi/auto/DBI/ Writing Makefile for DBD::Oracle *** If you have problems... read all the log printed above, and the README and README.help.txt files. (Of course, you have read README by now anyway, haven't you?) Refer my perl version: # perl -V Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC1.1-thread-multi uname='hp-ux bertha b.11.00 u 9000800 136901587 unlimited-user license ' config_args='-ders -Dcc=cc -Accflags=-DNO_HASH_SEED -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Dd_attribut=undef -Dd_u32align=define -Darchname=PA-RISC1.1 -Doptimize=-fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -Duselargefiles -Dinc_version_list=5.8.2/$archname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname 5.8.0 -Duseshrplib -Dprefix=/opt/perl -Dcf_by=ActiveState -dcf_email=supp...@activestate.com' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags =' -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ', optimize='-fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0', cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED' ccversion='B.11.11.10', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/usr/bin/ld', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib /usr/local/lib libs=-lcres -lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc perllibs=-lcres -lnsl -lnm -lmalloc -ldld -lm -lcrypt -lsec -lpthread -lc libc=/lib/libc.sl, so=sl, useshrplib=true, libperl=libperl.sl gnulibc_version='' Dynamic Linking: dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef,
Re: Some DBI question -
Hi Peter, Yes, that is correct ... am referring to these commands ... If I already have the .sql file that has all the formatting in them, is it okay to just run @x.sql from the Perl DBI script ... BTW, you mentioned some template toolkit, never heard of those ... can you elaborate on them or give a link reference that I can check On Tue, Jun 1, 2010 at 10:28 PM, Peter J. Holzer h...@wsr.ac.at wrote: On 2010-05-30 17:33:39 +1200, newbie01 perl wrote: Am trying out DBI for Oracle and just want to know if for example, I need to include column formatting stuff etc., is it best to just put them into a .sql file and then execute the .sql file instead of placing them in the Perl DBI script? By column formatting stuff you mean commands like column foo format a20 ? These are sqlplus commands, not sql commands, i.e., they are features of the query tool, not the database. Consequently, they are not available in perl. To format data in Perl, use Perl features, like printf, formats, various templating toolkits, etc. hp -- _ | Peter J. Holzer| Auf jedem Computer sollte der Satz Ludwigs II |_|_) | Sysadmin WSR | eingeprägt stehen: Ein ewig Rätsel will ich | | | h...@wsr.ac.at | bleiben, mir und andern. __/ | http://www.hjp.at/ |-- Wolfram Heinrich in desd -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFMBODFMdFfQa64PCwRAjWnAJ9OWXWMfa786KB1XIEQeFQZKZe9AwCfSMOU RPGR6X8KB4QAKqUBZdx+FeI= =UW1N -END PGP SIGNATURE-
Re: Some DBI question -
On 06/02/2010 04:17 PM, newbie01 perl wrote: Hi Peter, Yes, that is correct ... am referring to these commands ... If I already have the .sql file that has all the formatting in them, is it okay to just run @x.sql from the Perl DBI script ... BTW, you mentioned some template toolkit, never heard of those ... can you elaborate on them or give a link reference that I can check On Tue, Jun 1, 2010 at 10:28 PM, Peter J. Holzer h...@wsr.ac.at wrote: On 2010-05-30 17:33:39 +1200, newbie01 perl wrote: Am trying out DBI for Oracle and just want to know if for example, I need to include column formatting stuff etc., is it best to just put them into a .sql file and then execute the .sql file instead of placing them in the Perl DBI script? By column formatting stuff you mean commands like column foo format a20 ? These are sqlplus commands, not sql commands, i.e., they are features of the query tool, not the database. Consequently, they are not available in perl. To format data in Perl, use Perl features, like printf, formats, various templating toolkits, etc. hp -- _ | Peter J. Holzer| Auf jedem Computer sollte der Satz Ludwigs II |_|_) | Sysadmin WSR | eingeprägt stehen: Ein ewig Rätsel will ich | | | h...@wsr.ac.at | bleiben, mir und andern. __/ | http://www.hjp.at/ |-- Wolfram Heinrich in desd -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFMBODFMdFfQa64PCwRAjWnAJ9OWXWMfa786KB1XIEQeFQZKZe9AwCfSMOU RPGR6X8KB4QAKqUBZdx+FeI= =UW1N -END PGP SIGNATURE- Hi, newbie01 perl, First, may I suggest you should be bottom posting, that is, put your words after the rest, as I'm doing. It makes it easier for others to scan through a post and figure out what it's all about ;-) As Peter said, those formatting commands are a feature of the query tool. That means they work in sqlplus but not necessarily anywhere else. And the @filename function is also, I believe, specific to the query tool. Though it may be common as the symbol of choice in several different tools, it is a command for the tool, not the DBI or DBD. In fact, if you tried to use @x.sql from a DBI script, you'd get some sort of error, since you've defined an array, @x with a concatenation operator, dot, and a bareword: sql. You will have to remove the formatting commands from your file, use the real SQL to get data, and then format for output using one of the tools Peter mentioned. As for templating toolkits, you may want to go to CPAN, search for that name (or just template) and study the results. -- Bob McGowan
Re: SQLite - Time to build a database
On Wed, 26 May 2010 10:46:43 +1000, Owen wrote: So I read the main database row by row, tested the validity of one column, and inserted the good rows into a new database. This process took 27 minutes on a fairly recent desktop computer. ( about 1 rows a minute or 170 a second ) I thought the whole process would take a few seconds, so I wonder if 27 minutes is a reasonable time for this database creation. Well I timed actions using SQLite some time ago and I am lead to believe that every commit produces an fsync() in the database, which takes roughly 100ms on my old 1MHz PC running Linux, and which you may expect to take 50ms on a more modern computer. 2 possible solutions are: 1) don't commit on every single row, keep an eye on the clock and commit every N seconds (I'm thinking of 1/2 minute) plus once at the very end, of course 2) edit the C source of SQLite and replace the fsync() with fflush(), which ought to be around 100 times faster, but which isn't garanteed to withstand computer crashes, if it goes down before the data is finally stored on disk - not ideal in the eye of ACID perfectionists. Anyway, with current cache sizes inside the disk, nothing is garanteed after an fsync(), anyway. (Data might be in the disk's own cache but not yet committed to the physical disk) As the database was being created, I noticed a journal file was in use though I haven't worked out what that did, yet. It SQLite's scratchpad, where it stores its intentions for each transaction. If the computer goes down before a transaction is finalized, this could likely be used to redo the action and this time, complete it. Or, roll it back properly. -- Bart Lateur bart.lat...@telenet.be
Re: SQLite - Time to build a database
Bart Lateur wrote: 2) edit the C source of SQLite and replace the fsync() with fflush(), which ought to be around 100 times faster, but which isn't garanteed to withstand computer crashes, if it goes down before the data is finally stored on disk - not ideal in the eye of ACID perfectionists. Anyway, with current cache sizes inside the disk, nothing is garanteed after an fsync(), anyway. (Data might be in the disk's own cache but not yet committed to the physical disk) if you're using proper enterprise storage and non-broken OS's, 'write barriers' take care of this nicely. of course, enterprise storage usually has a battery backup on the controller write cache, anyways, and enterprise drives (scsi, sas, fc) understand to flush their drive cache on a write barrier operation.
Re: (Fwd) Help in installing DBD - DB2 for Perl
On Wed, Jun 2, 2010 at 1:36 AM, Tim Bunce tim.bu...@pobox.com wrote: - Forwarded message from raghav sridharan raghava...@yahoo.co.in - Date: Wed, 2 Jun 2010 06:56:01 +0530 (IST) From: raghav sridharan raghava...@yahoo.co.in To: tim.bu...@pobox.com Subject: Help in installing DBD - DB2 for Perl HelloTim, I am trying to install DBD-DB2 using the command ppm install DBD-DB2.ppd But I am getting the below error: ppm install failed The PPDdoes not provide code to install for this platform Can you please help ? I think that means that there is no pre-compiled version of DBD::DB2; you will need to be able to compile it for yourself. Alternatively, it means your network configuration is such that PPM/PPD does not work. However, it is much more likely that the module is not available. Use CPAN to obtain it. The current version appears to be 1.78, from January 2010. -- Jonathan Leffler jonathan.leff...@gmail.com #include disclaimer.h Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org Blessed are we who can laugh at ourselves, for we shall never cease to be amused.