Re: db or file access?
Ron Savage [RS], on Sunday, April 10, 2005 at 10:23 (+1000) made these points: RS IMHO data goes in databases and files go in directories. RS Raving about speed is simply premature optimization, and hence is a design fault. ok, thanks, will store that into files, I will know in future. Is there any web page about storing images in db vs. files ? -- ...m8s, cu l8r, Brano. [Bother! said Pooh, as his Earl Grey tea was delivered cold.]
Re: db or file access?
On 2005-04-10 10:23:38 +1000, Ron Savage wrote: IMHO data goes in databases and files go in directories. Isn't that a bit a circular definition? If you store an image in a file, it's a file and goes in a directory. If you store it in a database, it's data. Raving about speed is simply premature optimization, and hence is a design fault. I agree with that completely. Some considerations when deciding whether to store a piece of data in a relational DB or in the filesystem: Consistency: Do you need to ensure consistency between this data and other data? If you store data in files, then somebody can remove or alter the files without updating the meta-data in the database. Centralized access: If everything is in the database, you can either access all the data or none of it. If you have some data outside of the database, you may not have access to this data. Decentralized access: Sometimes it is useful to be able to access the data without the database (e.g., you may want to access individual documents via the file system. And finally, performance: RDBMs are generally optimized for lots of small data items which are organized into tables. Filesystems are generally optimized for larger data items organized into trees. There is considerable overlap where neither has a clear advantage, and of course it varies depending on what RDBMS and filesystem you use. hp -- _ | Peter J. Holzer \Beta means we're down to fixing misspelled comments in |_|_) | Sysadmin WSR \the source, and you might run into a memory leak if | | | [EMAIL PROTECTED] \you enable embedded haskell as a loadable module and __/ | http://www.hjp.at/ \write your plugins upside-down in lisp. [EMAIL PROTECTED] pgpNPfALxHYbE.pgp Description: PGP signature
Installing and trying DBD::Sybase 1.05
I've just downloaded DBD::Sybase 1.05 on my personal platform Mac OS X 10.3.8. I usually end up installing tested versions on HP-UX 11.x machines. I've been using DBD:.Sybase 1.04 plus DBI-1.48 with no problems (except those created by myself) on OS X. I've been able to generate the module, but the testing fails: $ make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/autocommitok 1/5dyld: /usr/bin/perl Undefined symbols: blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFBundleCopyBundleURL expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFBundleGetBundleWithIdentifier expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFRelease expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFStringCreateWithFormat expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFStringGetCString expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFURLCopyFileSystemPath expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to ___CFConstantStringClassReference expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined refa dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _com_st_ver expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _cs_calc expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _cs_conv_mult expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _ct_cmd_props expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _ct_poll expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _ct_sendpassthru expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _ct_wakeup expected to be defined in a dynamic image t/autocommitdubious Test returned status 0 (wstat 5, 0x5) DIED. FAILED tests 2-5 Failed 4/5 tests, 20.00% okay most of the test repeat the same pattern and in the end: Failed TestStat Wstat Total Fail Failed List of Failed --- t/autocommit.t0 5 58 160.00% 2-5 t/base.t 0 5?? ?? % ?? t/exec.t 0 517 32 188.24% 2-17 t/fail.t 0 512 22 183.33% 2-12 t/login.t 0 5 46 150.00% 2-4 t/main.t 0 529 56 193.10% 2-29 t/multi_sth.t 0 543 84 195.35% 2-43 t/nsql.t 0 5 7 12 171.43% 2-7 t/place.t 0 513 24 184.62% 2-13 t/thread.t0 5?? ?? % ?? t/xblk.t 0 562 122 196.77% 2-62 t/xblob.t 0 511 20 181.82% 2-11 Failed 12/12 test scripts, 0.00% okay. 193/203 subtests failed, 4.93% okay. make: *** [test_dynamic] Error 2 In the meantime, DBD::Sybase 1.04 is still working ... Any idea? Miguel Covas O'Ryan Director de Sistemas de Información Bancoval, S.A. Fernando el Santo, 20 Madrid 28010 AVISO LEGAL Este mensaje de correo electrónico y sus documentos adjuntos están dirigidos exclusivamente a los destinatarios especificados. Puede contener información confidencial o legalmente protegida. No hay renuncia a la confidencialidad o privilegio por cualquier transmisión errónea. Si usted no es el destinatario indicado, le rogamos que lo elimine y se lo comunique al remitente. No debe, directa o indirectamente, usar, revelar, distribuir, imprimir o copiar ninguna de las partes de este mensaje. Si siendo destinatario de este mensaje no consintiera el uso de correo electrónico, rogamos nos lo comunique inmediatamente. Bancoval,S.A. y sus filiales no serán responsables de las opiniones o informaciones incluidas en este mensaje salvo cuando el remitente esté autorizado para establecer que dichas opiniones proceden de Bancoval,S.A y sus filiales. DISCLAIMER Addressee/s identified herein. It may contain confidential or legally privileged information. No confidentiality privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and notify the sender. You must not, directly or indirectly, disclose, distribute, print, or copy any part of this message. If you are the addressee of this message and do not consent to the use of e-mail, please communicate it to us immediately. Bancoval, S.A. and its subsidiaries are not responsible for the opinions or information
Re: db or file access?
Peter J. Holzer [PJH], on Monday, April 11, 2005 at 09:56 (+0200) wrote: PJH Consistency: Do you need to ensure consistency between this data and PJH other data? If you store data in files, then somebody can remove or PJH alter the files without updating the meta-data in the database. yes, I agree with your post completely too. In my case all files will be local, and from my point of view it is better store images in database. PJH Centralized access: If everything is in the database, you can either PJH access all the data or none of it. If you have some data outside of the PJH database, you may not have access to this data. Agree. I want access all the data, or none. I think safer is storing them in db, you can't delete it by fault (remove files). PJH Decentralized access: Sometimes it is useful to be able to access the PJH data without the database (e.g., you may want to access individual PJH documents via the file system. This is not my case. PJH And finally, performance: PJH RDBMs are generally optimized for lots of small data items which are PJH organized into tables. Filesystems are generally optimized for larger PJH data items organized into trees. There is considerable overlap where PJH neither has a clear advantage, and of course it varies depending on what PJH RDBMS and filesystem you use. hm, in my case I will store 3kb images and I think they will be many files (50.000+). I use freebsd/mysql. -- ...m8s, cu l8r, Brano. [IBM: INTEL's Big Mouth]
Re: t/05threadclone.t fails
On Sun, Apr 10, 2005 at 06:13:26PM -0400, Philip M. Gollucci wrote: Tim Bunce wrote: If you, or someone, has something like valgrind handy (or any other tool that would help with malloc/threads debugging) that would be a big help. Same thing with 5.8.0, 5.8.6 both with ithreads I'm running perl -Mblib t/05thrclone.t in a loop using v5.8.6 built for i386-freebsd-thread-multi and I've had no failures yet. Here's the valgrind -v output... I didn't do --trace-pthreads=all ... (way too much output) I also lowered the $threads = 10 to $threads = 2 in the test script. I'd say it happens 70% of the time for me. Thanks. ==92812==/home/pgollucci/dev/inst/perl/5.9.3-i/bin/perl So this valgrind run was with a bleadperl that not released yet. Very blead :) ok 6 - ... the Driver has one Kid ==92812== Conditional jump or move depends on uninitialised value(s) ==92812==at 0x3C10F615: Perl_sv_dup (sv.c:10747) ==92812==by 0x3C3FF1D8: Perl_ithread_join (threads.xs:634) ==92812==by 0x3C3FFCAE: XS_threads_join (threads.xs:728) ==92812==by 0x3C0F593B: Perl_pp_entersub (pp_hot.c:2816) ==92812== ==92812== Conditional jump or move depends on uninitialised value(s) ==92812==at 0x3C10F615: Perl_sv_dup (sv.c:10747) ==92812==by 0x3C110907: Perl_sv_dup (sv.c:10958) ==92812==by 0x3C3FF1D8: Perl_ithread_join (threads.xs:634) ==92812==by 0x3C3FFCAE: XS_threads_join (threads.xs:728) Sure looks like a perl problem. What's on around sv.c:10747? Is the same line of code implicated with perl 5.8.6? (possibly moved slightly, of course.) Tim.
Re: db or file access?
On Mon, 11 Apr 2005 08:58:20 +0200, Ing. Branislav Gerzo wrote: Hi ok, thanks, will store that into files, I will know in future. Is there any web page about storing images in db vs. files ? I don't know of any particular articles discussing this, but I've seen the issues raised a number of times over the years. I'm sure you can search the web and find people who support both sides of the argument! Also, I'm glad you did not take my comments as criticism of yourself. I did not use the word 'you' which would have implied you personally were raving. I was trying to indicate that people who put efficiency/logic/speed ahead of good design are raving. -- Cheers Ron Savage, [EMAIL PROTECTED] on 11/04/2005 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company
Re: db or file access?
On Mon, 11 Apr 2005 09:56:21 +0200, Peter J. Holzer wrote: Hi Peter On 2005-04-10 10:23:38 +1000, Ron Savage wrote: IMHO data goes in databases and files go in directories. Isn't that a bit a circular definition? If you store an image in a file, it's a file and goes in a directory. If you store it in a database, it's data. Well, I guess I'm saying that I see images as standalone objects and hence suitable for storing in files, and would always choose to store them in files. I'm sure someone somewhere will store them in databases. -- Cheers Ron Savage, [EMAIL PROTECTED] on 11/04/2005 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company
Errors while inserting into long data type
Hi Friends, I am using oracle database and I have column of long data type. I insert the data into this column thru perl script. If the inserted data exceeds 4000 chars, it is giving me the following error. DBD::Oracle::st execute failed: ORA-01704: string literal too long (DBD ERROR: OCIStmtExecute) at MT/TACDbManager.pm line 445. Whereas we can insert upto 2GB of data in long data type. Pl. help me out to solve this. Thanks Regards, Mallik.
Re: db or file access?
Ron Savage [RS], on Monday, April 11, 2005 at 21:06 (+1000) thoughtfully wrote the following: RS Also, I'm glad you did not take my comments as criticism of yourself. I did not RS use the word 'you' which would have implied you personally were raving. that's ok. I'd like to know both sides of story, also no way is perfect. Every side has own thruth, cons and pros. So that's ok. RS I was trying to indicate that people who put RS efficiency/logic/speed ahead of RS good design are raving. It is interesting to me, how can be faster storing files on disk versus database. If I have many pictures in database overall db performance is slower? -- ...m8s, cu l8r, Brano. [A recipe at this point would be irrelevant, right?]
Re: db or file access?
Sample database code supplied with Sybase stores pics :p I'm sure someone somewhere will store them in databases. -- -- Your Friendly Neighborhood DBA, Chuck
Re: t/05threadclone.t fails
I'm running perl -Mblib t/05thrclone.t in a loop using v5.8.6 built for i386-freebsd-thread-multi and I've had no failures yet. * Whats the uname -a you've got ? * Did you link against libc_r or libpthread. I'll retest this tonightish. Thanks!
RE: Errors while inserting into long data type
Mallik [mailto:[EMAIL PROTECTED] wrote: Hi Friends, I am using oracle database and I have column of long data type. I insert the data into this column thru perl script. If the inserted data exceeds 4000 chars, it is giving me the following error. DBD::Oracle::st execute failed: ORA-01704: string literal too long (DBD ERROR: OCIStmtExecute) at MT/TACDbManager.pm line 445. Whereas we can insert upto 2GB of data in long data type. Let's see your code. I suspect you're not using bind_param() with an explicit ORA_TYPE, as described in the DBD::Oracle documentation. Ronald
install_driver(Sybase) failed: DBD::Sybase initialize:
Help.. I have been struggling to get DBI to work on my server... Here is the code.. #! /usr/bin/perl #use strict; BEGIN { $ENV{SYBASE} = /opt/sybase11.9.2; } use DBI; print Here's a list of DBI drivers:\n; my @available_drivers = DBI-available_drivers('quiet'); my $driver; foreach $driver (@available_drivers) { print $driver\n; } foreach $key (sort keys(%INC)) { print $key = $INC{$key}\n; } my $dbh =DBI-connect(dbi:Sybase:server=crisp, 'sa', '', {PrintError = 0}); die Unablee for connect to server $DBI::errstr unless $dbh; my $rc; my $sth; $sth = $dbh-prepare(select [EMAIL PROTECTED]@servername); if($sth-execute) { while(@$dat = $sth-fetchrow) { print @dat\n; } } my $key; and the output is Here's a list of DBI drivers: DBM ExampleP File Proxy Sponge Sybase AutoLoader.pm = /opt/perl-uxpe/lib/5.8.0/AutoLoader.pm Carp.pm = /opt/perl-uxpe/lib/5.8.0/Carp.pm Config.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Config.pm Cwd.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Cwd.pm DBI.pm = /opt/perl-uxpe/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi/DBI.pm DirHandle.pm = /opt/perl-uxpe/lib/5.8.0/DirHandle.pm DynaLoader.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm Exporter.pm = /opt/perl-uxpe/lib/5.8.0/Exporter.pm Exporter/Heavy.pm = /opt/perl-uxpe/lib/5.8.0/Exporter/Heavy.pm ExtUtils/Installed.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Installed.pm ExtUtils/Liblist.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist.pm ExtUtils/Liblist/Kid.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist/Kid.pm ExtUtils/MM.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/MM.pm nstall_driver(Sybase) failed: DBD::Sybase initialize: ct_init(1100) failed at /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm line 249. Compilation failed in require at (eval 36) line 3. at ./test.pl line 29 can someone please help Anand Desai
Re: install_driver(Sybase) failed: DBD::Sybase initialize:
Anand, It appears that your environment is not correctly setup. Check that you have sourced in the SYBASE.sh located at /opt/sybase11.9.2. It appears that DBD::Sybase attempted to call ct_init in the Sybase libs and failed to find it. Check the SHLIB_PATH. Use isql to connect to verify that open client is working properly. Then start digging into the perl code. Desai, Anand (HP-GDIC) wrote on 4/11/2005, 8:58 AM: Help.. I have been struggling to get DBI to work on my server... Here is the code.. #! /usr/bin/perl #use strict; BEGIN { $ENV{SYBASE} = /opt/sybase11.9.2; } use DBI; print Here's a list of DBI drivers:\n; my @available_drivers = DBI-available_drivers('quiet'); my $driver; foreach $driver (@available_drivers) { print $driver\n; } foreach $key (sort keys(%INC)) { print $key = $INC{$key}\n; } my $dbh =DBI-connect(dbi:Sybase:server=crisp, 'sa', '', {PrintError = 0}); die Unablee for connect to server $DBI::errstr unless $dbh; my $rc; my $sth; $sth = $dbh-prepare(select [EMAIL PROTECTED]@servername); if($sth-execute) { while(@$dat = $sth-fetchrow) { print @dat\n; } } my $key; and the output is Here's a list of DBI drivers: DBM ExampleP File Proxy Sponge Sybase AutoLoader.pm = /opt/perl-uxpe/lib/5.8.0/AutoLoader.pm Carp.pm = /opt/perl-uxpe/lib/5.8.0/Carp.pm Config.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Config.pm Cwd.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Cwd.pm DBI.pm = /opt/perl-uxpe/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi/DBI.pm DirHandle.pm = /opt/perl-uxpe/lib/5.8.0/DirHandle.pm DynaLoader.pm = /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm Exporter.pm = /opt/perl-uxpe/lib/5.8.0/Exporter.pm Exporter/Heavy.pm = /opt/perl-uxpe/lib/5.8.0/Exporter/Heavy.pm ExtUtils/Installed.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Installed.pm ExtUtils/Liblist.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist.pm ExtUtils/Liblist/Kid.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist/Kid.pm ExtUtils/MM.pm = /opt/perl-uxpe/lib/5.8.0/ExtUtils/MM.pm nstall_driver(Sybase) failed: DBD::Sybase initialize: ct_init(1100) failed at /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm line 249. Compilation failed in require at (eval 36) line 3. at ./test.pl line 29 can someone please help Anand Desai -- Your Friendly Neighborhood DBA, Chuck
Re: t/05threadclone.t fails
On Mon, Apr 11, 2005 at 09:28:02AM -0400, Philip M. Gollucci wrote: I'm running perl -Mblib t/05thrclone.t in a loop using v5.8.6 built for i386-freebsd-thread-multi and I've had no failures yet. * Whats the uname -a you've got ? It's 4.10-STABLE (old, I know, and destined to be radically upgraded within a month or three). * Did you link against libc_r or libpthread. pthread, see below. I'll retest this tonightish. Thanks. Anyone else got a perl built with threads enabled that they can stress-test with t/05thrclone.t? Just grab 05thrclone.t from here http://svn.perl.org/modules/dbi/trunk/t/05thrclone.t And use something like this (assuming a borne-like shell): while perl 05thrclone.t 05thrclone.log 21; do date; done Should run forever. If it fails it'll stop and 05thrclone.log will hold the log of the last run. Let us know how long it ran for and what 05thrclone.log says. Thanks! Tim. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=freebsd, osvers=4.10-stable, archname=i386-freebsd-thread-multi uname='freebsd dansat.data-plan.com 4.10-stable freebsd 4.10-stable #0: thu nov 25 15:23:12 gmt 2004 [EMAIL PROTECTED]:usrobjusrsrcsysdansatsmp i386 ' config_args='-des -Dprefix=/usr/local/perl585-i -Doptimize=-g -Duseithreads -Dusemultiplicity' 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 ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include', optimize='-g', cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags ='-pthread -Wl,-E -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -ldb -lm -lcrypt -lutil -lc_r perllibs=-lm -lcrypt -lutil -lc_r libc=, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Re: t/05threadclone.t fails
It's 4.10-STABLE (old, I know, and destined to be radically upgraded within a month or three). Ahah! thats before the kernel SMPng ! Thats a _BIG_ difference... I'll stress it tongiht. (FBSD 6.0-current w/ libpthread) -- END - Philip M. Gollucci Senior Developer - Liquidity Services Inc. Phone: 202.568.6268 (Direct) E-Mail: [EMAIL PROTECTED] Web:http://www.liquidation.com
Re: Installing and trying DBD::Sybase 1.05
On Mon, 2005-04-11 at 10:16, Miguel Covas O'Ryan wrote: I've just downloaded DBD::Sybase 1.05 on my personal platform Mac OS X 10.3.8. I usually end up installing tested versions on HP-UX 11.x machines. I've been using DBD:.Sybase 1.04 plus DBI-1.48 with no problems (except those created by myself) on OS X. I've been able to generate the module, but the testing fails: $ make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/autocommitok 1/5dyld: /usr/bin/perl Undefined symbols: blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFBundleCopyBundleURL expected to be defined in a dynamic image blib/arch/auto/DBD/Sybase/Sybase.bundle undefined reference to _CFBundleGetBundleWithIdentifier expected to be defined in a dynamic image A little googling goes a long way... http://groups-beta.google.com/group/sybase.public.macosx/browse_thread/thread/58a37c62080397dd/d22a38db2705d421?q=_CFBundleCopyBundleURLrnum=2#d22a38db2705d421 Michael -- Michael Peppler - [EMAIL PROTECTED] - http://www.peppler.org/ Sybase DBA/Developer Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
Re: install_driver(Sybase) failed: DBD::Sybase initialize:
On Mon, 2005-04-11 at 14:58, Desai, Anand (HP-GDIC) wrote: Help.. I have been struggling to get DBI to work on my server... Here is the code.. #! /usr/bin/perl #use strict; BEGIN { $ENV{SYBASE} = /opt/sybase11.9.2; } nstall_driver(Sybase) failed: DBD::Sybase initialize: ct_init(1100) failed at /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm line 249. In general this means that the actual Sybase libraries that are loaded are of an older version level than the ones used to build the DBD::Sybase module. Another possibility is that your Sybase installation is somehow incorrect. The first thing to check is the SHLIB_PATH (I think that's what it's called under HP-UX) to make sure that the correct Sybase library directory is picked up at run-time, and second you should check that the libraries in $SYBASE/lib are the right ones (for example, run strings $SYBASE/lib/libct.a | grep Sybase and see what version string you get. As an example, I get: Sybase Client-Library/15.0/A/DRV.15.0.0/Linux Intel/Linux 2.4.21-20.ELsmp i686/BUILD1500-032/OPT/Mon Feb 28 16:00:11 2005 In your case you should get 11.1.1 instead of the 15.0, and probably some EBF string. Michael -- Michael Peppler - [EMAIL PROTECTED] - http://www.peppler.org/ Sybase DBA/Developer Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
Re: Errors while inserting into long data type
Oh, and I see you *did* send this to the DBI list. Never mind my previous comment :) Cheers, Ovid --- Mallik [EMAIL PROTECTED] wrote: Hi Friends, -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
Re: Errors while inserting into long data type
Hi Mallik, I suspect you'll get more help on a DBI list, but right off the bat, I'm wondering why it says string literal too long. Are you adding the data directly to an SQL query? In other words, are you doing something like this? INSERT INTO TABLE (name) VALUES ('$some_var'); Not only is that a potential security hole if done incorrectly, but I believe some DBD's will choke if $some_var is too large. Try using a bind variable and see if that avoids the problem: my $sth = $dbh-prepare(INSERT INTO TABLE (name) VALUES (?)); $sth-execute($some_var); Cheers, Ovid --- Mallik [EMAIL PROTECTED] wrote: Hi Friends, I am using oracle database and I have column of long data type. I insert the data into this column thru perl script. If the inserted data exceeds 4000 chars, it is giving me the following error. DBD::Oracle::st execute failed: ORA-01704: string literal too long (DBD ERROR: OCIStmtExecute) at MT/TACDbManager.pm line 445. Whereas we can insert upto 2GB of data in long data type. Pl. help me out to solve this. Thanks Regards, Mallik. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
DBD-Oracle
Dear perl dbi team, I need a windows binary for the DBD-Oracle, but it seems the esoftmatic link is invalid. Do you know any different sources or whether the esoftmatic is only temporarily unavailable? Kind Regards, Christian Braeuner
Re: db or file access?
On Apr 11, 2005 12:56 AM, Peter J. Holzer [EMAIL PROTECTED] wrote: On 2005-04-10 10:23:38 +1000, Ron Savage wrote: IMHO data goes in databases and files go in directories. [--- good stuff snipped ---] RDBMs are generally optimized for lots of small data items which are organized into tables. Filesystems are generally optimized for larger data items organized into trees. There is considerable overlap where neither has a clear advantage, and of course it varies depending on what RDBMS and filesystem you use. It's basically what's being said in this post, but I personally would opt for storing the files outside of the DB, because my experience saya that BLOB and CLOB datatypes severely mess up database IO performance. But if you DO follow this suggestion, be sure your application is written robustly enough to easily change the image root directory because the pix WILL get moved around over the lifespan of your app. HTH, kdot
RE: Accessing MS Access
Ok. I have tried ADO as well with no luck. Please help! snip # Include CPAN modules for DB communication use DBI; #use DBD::ODBC; use DBD::ADO; #use Win32::OLE; # Use these pragmas to code correctly use strict; # Include custom functions require Functions.pl; # Debug $::DEBUG=1; # Connect to the database, return error message if something went wrong my ($path_to_mdb_file) = '\\slpmxwtstandclu\testdata$\Data_2.mdb'; my ($dsn)= Provider=Microsoft.Jet.OLEDB.4.0;Data Source=$path_to_mdb_file; Debug(About to connect to $dsn); #$::dbh = DBI-connect( dbi:ADO::Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=$path_to_mdb_file ,'admin', { AutoCommit = 1} ) or $::dbh = DBI-connect(dbi:ADO:$dsn, 'Admin', '', { AutoCommit = 1} ) or Error(Unable to connect to database.); endsnip With the first connection string I got: [Mon Apr 11 14:23:42 2005] [error] [client 151.110.117.153] Usage: $class-connect([$dsn [,$user [,$passwd [,\\%attr) at C:/oracle/ora92/Apache/Apache/ITTWeb/cgi-bin/CLUCTR.pl line 63\r, referer: http://slpmxwmorenojav/ITTWeb/cgi-bin/Welcome.pl while with the second I get: [Mon Apr 11 14:29:57 2005] [error] [client 151.110.117.153] dbih_getcom given an undefined handle (perhaps returned from a previous call which failed) at C:/Perl/site/lib/DBI.pm line 598.\r, referer: http://slpmxwmorenojav/ITTWeb/cgi-bin/Welcome.pl Regards, Javier Moreno -Original Message- From: amonotod [mailto:[EMAIL PROTECTED] Sent: Friday, April 08, 2005 8:07 PM To: Moreno, Javier; dbi-users@perl.org Subject: Re: Accessing MS Access From: Moreno, Javier [EMAIL PROTECTED] Date: 2005/04/08 Fri PM 03:44:40 CDT snip I posted a question and have tried several solutions on how to open up an MS Access DB from the DBI::ODBC but so far have been unable to. snip I was wondering if there is a better way to get information from Access so I can see it on my CGI with DBI. snip Well, I've posted several times (the last time was in a reply to a thread that you started) that you should use ADO to connect to your Access database, and I gave you connection examples. So, I guess the answer is yes, there may indeed be a better way to connect to your Access database than with DBD::ODBC. If not better, at least different. http://www.nntp.perl.org/group/perl.dbi.users/26145 Regards, Javier Moreno HTH, amonotod -- `\|||/ amonotod@| sun|perl|windows (@@) charter.net | sysadmin|dba ooO_(_)_Ooo _|_|_|_|_|_|_|_|
Re: Accessing MS Access
On Apr 11, 2005 12:35 PM, Moreno, Javier [EMAIL PROTECTED] wrote: Ok. I have tried ADO as well with no luck. Please help! snip # Include CPAN modules for DB communication use DBI; #use DBD::ODBC; use DBD::ADO; #use Win32::OLE; # Use these pragmas to code correctly use strict; # Include custom functions require Functions.pl; # Debug $::DEBUG=1; # Connect to the database, return error message if something went wrong my ($path_to_mdb_file) = '\\slpmxwtstandclu\testdata$\Data_2.mdb'; Aha! You are attempting to connect to a database on what looks like a network share. My guess is this is probably not a Perl issue, but rather a network authentication issue- Try to create an empty text file on '\\slpmxwtstandclu from the same account you're running your script from... If you can, then my guess is there's something funny going on in the Access DB. But if you can't, then make sure the network account from which you physically run the perl script has read/write permissions for the network resource you are using and if you schedule this perl script to run at a specific time, you have to make sure the definition of the scheduled task ALSO has the network authentication parameters (user name / passwd) correct. HTH- kc
Re: Accessing MS Access
From: Kevin Carothers [EMAIL PROTECTED] Date: 2005/04/11 Mon PM 03:06:59 CDT On Apr 11, 2005 12:35 PM, Moreno, Javier [EMAIL PROTECTED] wrote: Ok. I have tried ADO as well with no luck. Please help! snip my ($path_to_mdb_file) = '\\slpmxwtstandclu\testdata$\Data_2.mdb'; Aha! You are attempting to connect to a database on what looks like a network share. My guess is this is probably not a Perl issue, but rather a network authentication issue- snip But if you can't, then make sure the network account from which you physically run the perl script has read/write permissions for the network resource you are using... Another way to test that theory, is copying your .mdb file over to a local path on the webserver, like \\webserver\c$\temp, then changing $path_to_mdb_file = c:/temp/Data_2.mdb In case that is the issue, and you're running IIS, here you go: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q207671 HTH, amonotod -- `\|||/ amonotod@| sun|perl|windows (@@) charter.net | sysadmin|dba ooO_(_)_Ooo _|_|_|_|_|_|_|_|
RE: DBD-Oracle
Please, temporarily, change ftp.esoftmatic.com to 24.249.249.7. I'm still working on resolving the DNS issues since moving ISPs and my current ISP is relatively deaf. I probably have to bit the bullett and put DNS on my server(s), which I'm not thrilled about ;) Jeff -Original Message- From: Christian Braeuner [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 2:19 PM To: dbi-users@perl.org Subject: DBD-Oracle Dear perl dbi team, I need a windows binary for the DBD-Oracle, but it seems the esoftmatic link is invalid. Do you know any different sources or whether the esoftmatic is only temporarily unavailable? Kind Regards, Christian Braeuner
RE: Errors while inserting into long data type
Hi Philip, Thanks for your reply. It worked with bind_param. I have one more question, how to set the LongReadLen parameter in a perl script? Thanks, Mallik. -Original Message- From: Philip Mikal [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 11:36 PM To: 'Mallik'; [EMAIL PROTECTED] Subject: RE: Errors while inserting into long data type Hi Mallik, String literals in Oracle are limited to 4000 characters. http://www.google.com/search?hl=enq=Inserting+and+Updating+LONG%2FLOB+Colum ns Also, you may find using the perl-trolls alias better for general perl programming questions. Regards, Philip Mikal ITD Webteam Cisco Internet Experts -Original Message- From: Mallik [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 4:10 AM To: [EMAIL PROTECTED] Subject: Errors while inserting into long data type Hi Friends, I am using oracle database and I have column of long data type. I insert the data into this column thru perl script. If the inserted data exceeds 4000 chars, it is giving me the following error. DBD::Oracle::st execute failed: ORA-01704: string literal too long (DBD ERROR: OCIStmtExecute) at MT/TACDbManager.pm line 445. Whereas we can insert upto 2GB of data in long data type. Pl. help me out to solve this. Thanks Regards, Mallik.