Actually he did indicate running Linux on a dual processor system, so
the OS should support running separate threads on separate processors.
The question then would be: does Perl multithreading, along with the
DBI library, let you make use of this?
Of course you might be right, the program could
Maybe I'm missing something here, but isn't this simply a matter of
using DBD::CSV? You could open two dbi handles, one to your existing
Oracle db and the other to a csv db. Read from the one, write to the
other. When you get the new schema set up on the new platform, do the
same thing in the re
Very well put, Jeffrey. That was exactly the thought bothering me after
I posted my reply. Is it really written in stone that the original
database will be destroyed after their one attempt at making a backup?
Such a decision would be highly suspect. Surely they could find one
spare PC to keep
I think another common way to go about it is to put something like this
into your crontab command:
su - -c 'run my command here'
And then when the crontab runs it logs you in to the right user id with
all the environment settings intact. Works especially well if you have
it set up in the root c
Got it.
-Will
> -Original Message-
> From: pgodfrin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday 08 April 2008 14:45
> To: dbi-users@perl.org
> Subject: Re: Problem posting replies
>
>
> On Apr 8, 12:46 pm, [EMAIL PROTECTED] (Pgodfrin) wrote:
> > Any reason I can't post a reply to posts?
>
t: Friday 04 April 2008 16:01
To: Rutherdale, Will
Cc: DBI Users Mailing List
Subject: Re: Blank inserted with varchar copy using prepare
On Fri, Apr 4, 2008 at 12:03 PM, Rutherdale, Will <[EMAIL PROTECTED]>
wrote:
I confirmed the problem
I confirmed the problem occurs on another machine I was wondering about.
I tried installing the latest DBI and DBD::Informix. DBI was okay, but
DBD::Informix started out giving me the following warnings on 'perl
Makefile.PL':
Using INFORMIX-ESQL Version 9.21.UC1 from /usr/informix
Please up
Hi.
I am using Perl 5.8.8 on SunOS pnc 5.8 with Informix (Server Version
9.30) and DBI 1.51 and DBD::Informix 2005.2.
I try to copy a list of tables using DBI. I have found that a certain
column declared as varchar(64) is copied incorrectly when it contains an
empty string. The value in the tar
I'm not an Oracle specialist, but here's one tip.
You *can* install your own gcc. Same for Perl, and DBI libraries. If
you follow the README directions you will see there is a configure
script and you can get 'make install' to install the software in a
location of your own choosing. Then you ju
The fundamental issue before you do anything else is to get error
messages. I mentioned in a previous post where you can usually see
them.
I don't know how experienced you are writing Perl code, but when writing
command-line scripts you quickly get used to seeing compilation errors
and other anno
Dave:
To expand on Alexander's point, the usual place to look is
/var/log/httpd/error_log. All the STDERR from your cgi script goes
there. You should be using that to debug your code, not looking at the
status bar of the web browser.
Check your favourite documentation on Apache or cgi program f
I am using Ubuntu at home and have successfully installed all the C
development tools necessary to
a) install things like Perl and Perl libraries
b) write Linux device drivers
Getting all the development packages installed in Ubuntu took several
hours' effort one evening. Basically the fi
I'm not experienced with this exact issue in particular, but you might find
you're running under a different user ID with your test program than with your
web application.
You didn't specify what OS you're using or whether you're using Apache.
However from my experience in web vs. command-line
It's not clear from your message what you want.
If you mean that you want to open a db handle or set of handles in the
same way with the same options across a number of scripts, why don't you
just create a function for that? You can create your own Perl module
exporting that function and just cal
administrator: is there any way to remove him at your own
initiative?
These messages are getting tiresome.
-Will
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday 24 July 2007 04:02
To: Rutherdale, Will
Subject: Christophe
My wife, Diana Dhaskali, has provided the following translation from French to
English:
I have installed Oracle database 10g express Edition (10.2.0) then I have
installed DBI 1.58 et DBD-Oracle 1.17. I use the following script use DBI;
require "tools.pl";
...
$dbh=DBI->connect($DBase,$usr,
Tim, I have a couple of feedback comments on your text.
A) I would not characterise 32-bit signed integers as giving 10 digits
of precision as you did. They give log10( 2^31 ) ~= 9.3319 digits of
precision. Since you can't count on the full 10th digit, I would
truncate and tell people you get 9
I personally tried some simple experiments with gcc. I found that
printf( "%0.20lg", x ) where x is a double with value 1.73696, yielded
this value:
1.73696000595
However, feeding that back to a double variable using sscanf() resulted
in a value that tested equal to 1.73696. Using sscanf
I admire Peter's effort in tracking down the specifics at various
conversion points.
However, there are no documented guarantees of equality from the
library. I hope you're not seriously considering jigging the libraries
to make your program work. If you do that, you'll run up against the
same p
Sounds like you're hitting machine epsilon.
It is well known that floating point representations aren't exact, and
various conversions (e.g. to and from decimal representation) are just
going to increase the problem. This is a well known issue people
encounter in numerical analysis courses in com
The standard Unix semantics is this: a child process inherits the
environment from its parent. Therefore if you (export and) set an
environment variable in a process and then run a script, it will see
that environment variable.
Furthermore, _Programming Perl, 3rd ed_ by Wall et all says this abo
I am testing dbi user mailing list problems.
The last dbi-users message I got was on Friday. Then the ezmlm mailer
sent me messages about bounces. I haven't got anything else since.
This is a test message to see if it arrives at my inbox.
-Will
- - - - - Appended by Scientific Atlanta,
This is a very interesting problem, Martin, because most of us ordinary
Perl users don't experience these issues on a regular basis if ever.
Just one thought, maybe a bit naiive, but wouldn't it be possible to
copy all the values you've got from the database and do the extra
computations on the co
I have solved this problem for one configuration (Informix) as follows:
a) check with legal dept regarding licenses (e.g. Artistic)
b) build all required versions of Perl, DBI, DBD on one machine
c) build tar files for Perl, DBI, DBD
d) work installation of those tar files into the installation
Cute, about the rabbits. :-)
-Will
> -Original Message-
> From: David Nicol [mailto:[EMAIL PROTECTED]
> Sent: Wednesday 23 August 2006 17:28
> To: Rutherdale, Will
> Cc: dbi-users@perl.org
> Subject: Re: Help with my perl script
>
>
> On 8/23/06, Rutherd
I believe you *are* missing something. You're going to have to
understand how processes and forking work in Unix. The fork() call
invokes a new process. In effect it is a new script on its own.
Stephen's Parallel::ForkManager is just syntactic sugaring around the
same thing.
Semaphores have no
This is not really a DBI question, because, although your testing is
over DBI, the capabilities you're asking about concern elementary Perl.
Try
$ man perlfunc
and you will see there is a fork() function available standard in Perl
that lets you run multiple copies of the same code as separate
p
Concerning stale data, depending on your application's design, you might
want to set AutoCommit to 0 (off). You can do this as an option in
connect, like this:
my $dbh = DBI->connect( ... { AutoCommit => 0 } );
Once you do this, the underlying database will treat all your DB
operations as a sing
Just to expand on that piece of the discussion, there are cases where I
don't use 'die' on DBI statements at all.
For instance, I may have a system script (not for end users) whose
purpose is to do some database update operations and either succeed or
fail. If it succeeds then it does the whole j
I find Perl with DBI to be very fast, which is one of the main reasons I
use it.
I've seen database update code written another way that is very slow:
namely, to write shell scripts and repeatedly invoke the command-line
tool (e.g. dbaccess in the case of Informix).
Perl DBI is several orders of
If one wanted to get up to date for a while on a Perl-DBI-Informix
combo, would this be a good set of versions:
Perl 5.8.8
DBI 1.50
DBD::Informix 2005.02
We're not changing Informix itself at this point. Just wanted to recap
versions for Perl and libraries based on what's been mentioned in this
That explains it. The purpose of placeholders is to let you specify
values, not column names. Your first form, without the placeholders, is
the correct way to do it.
I have a question: why do you even use variables for the column names?
Aren't the column names constant?
-Will
> -Original
Others on this list may know more about the MySQL specifics, but in
general DBI has transaction support for all databases.
You turn it on in DBI with this:
$dbh->{AutoCommit} = 0;
Or by setting AutoCommit to 0 in the connect() parameters.
Consult the man pages for more information.
-Will
---
Be careful, Hetal!
You should *not* have any
use DBD::xxx;
in your code.
However you *must* have
use DBI;
near the top of the program.
Do you have that? Please answer.
-Will
-Original Message-
From: Hetal Soni [mailto:[EMAIL PROTECTED]
Sent: Monday 27 February 2006 17:37
To: Cliv
You still need this line:
use DBI;
Do you have that still?
-Will
-Original Message-
From: Hetal Soni [mailto:[EMAIL PROTECTED]
Sent: Monday 27 February 2006 17:27
To: Alexander Foken; dbi-users@perl.org
Subject: RE: A common perl script for different database platforms
Thanks for
Formulas for great circle distances aren't hard to derive using just
basic trig. No calculus required!
That being said, the Math::Trig package comes standard with Perl
distributions and has a function called great_circle_distance(). Try
'man Math::Trig'. If you search PDL::Index on CPAN, I beli
Thanks, Greg. That's very informative.
I really ought to dig into DBI/DBD internals in the near future,
probably using postgreSQL as an example.
I use postgreSQL at home sometimes but not currently at work.
-Will
-Original Message-
From: Greg Sabino Mullane [mailto:[EMAIL PROTECTED]
S
Vielen Glueck mit ihren Aufgabe an der Uni.
-Will
-Original Message-
From: Christian Stalp [mailto:[EMAIL PROTECTED]
Sent: Thursday 23 February 2006 18:24
To: Rutherdale, Will
Cc: dbi-users@perl.org
Subject: RE: Calling a PostgreSQL function via DBI
> I'm glad it worked.
>
I'm glad it worked.
However I'm still concerned with why you need the nonportable form of ??::text
etc.
Is this because you are running a user defined function which has no schema
associated with it the way a regular table or view would?
Is there some way to make it more portable, i.e. not nee
In that case $dbh->quote() is considered the portable way of inserting quote
marks, in that the underlying db driver, which is hidden from your code,
determines in what form those quote marks will be constructed, so as to be
compatible with your particular database.
If you try 'man DBI' or read
Louis,
Perhaps you could attempt to explain, politely this time, what you meant
by the following.
> As for your select statement with the $arg1, ..., $argN, the
bind_param() function will work
> on those arguments too, I'd just suggest to use the process of double
quoting your string
> concaten
This gets back to the point of my earlier posting.
Louis's suggestion of using bind_param() is probably correct and the preferred
way of doing things.
However, his alternative solution with, for instance,
$arg4 = "$system_zeit" . "::timestamp";
does not work, because putting quotes around th
Louis, I'm sure the construct you give below has no effect in Perl.
"$someVariable" is identical to $someVariable.
Perhaps what you meant was
$arg1 = $dbh->quote( $someVariable ) . "::someText";
-Will
-Original Message-
From: Louis Gonzales [mailto:[EMAIL PROTECTED]
Sent: Thursday 23 F
I don't have Jonathan's level of Perl expertise, but from my own experience
I would suggest:
A) Download Perl sources from the CPAN site and build them using gcc.
Maybe install a more recent version of gcc first. This costs only time and
effort, but not money.
B) Forget automated CPAN installa
This is a user group of other people like yourself who use DBI. It is not a
support line. Please bear that in mind.
The first thing I would look at is your open() statement. There are lots of
things wrong with it.
a) determine the uid separately and store it in a string, before the open()
call
Read standard books such as _Programming Perl_ by Wall etc. for information
on array references.
Generally references are the most efficient way to pass arrays around or
return them from a function. Returning an array instead of a reference to
an array means the whole array has to be copied. Arr
It doesn't work according to the DBI documentation.
>From _Programming the Perl DBI_, p. 223 (for example):
>For SELECT statements, execute simply "starts" the query within the
database engine. Use one of
>the fetch methods to retrieve the data after calling execute. The execute
method does _
use IO::Handle;
LOGF->autoflush( 1 );
In the teach a man to fish spirit, look at the Perl Cookbook section 7.19.
Also Programming Perl says a few things about this topic. You should have
those books handy if you're writing much Perl code.
That wasn't really a DBI question though.
-Will
-
Perhaps this was too obvious a point for others to bother mentioning, but
there *is* a related DBI specific connection to your problem.
If you choose to use DBI, you can make use of the $dbh->quote() method,
which will transparently implement the correct quoting algorithm for your
particular DBD (
day 07 October 2005 04:39
To: Jonathan Leffler
Cc: Rutherdale, Will; List - DBI users
Subject: Re: Perl DBI and threads.pm
On Thu, Oct 06, 2005 at 07:42:14PM -0700, Jonathan Leffler wrote:
> On 10/6/05, Rutherdale, Will <[EMAIL PROTECTED]> wrote:
>
> > We have some Perl DBI s
Hi.
We have some Perl DBI scripts and have been running them on a Perl compiled
with threading disabled. (I.e. perl -V gives ...usethreads=undef...). I
also have another environment where Perl is compiled with usethreads=define
and have found the threading capabilities useful. (This is the Perl
Nobody ever claimed Perl is faster than C. Just more appropriate for
certain kinds of jobs.
Have you tried setting $dbh->RowCacheSize? This can make a big different in
bulk data operations.
-Will
-Original Message-
From: Gerardo Santana Gómez Garrido [mailto:[EMAIL PROTECTED]
Sent: M
Actually I thought of an even better answer to your question.
You shouldn't have to build gcc, and you shouldn't have to build Perl. You
can get both from the Sun Freeware site (http://www.sunfreeware.com/) and
install them using pkgadd. You can use 'Perl -V' to determine which version
of gcc yo
This question is off topic because it's not directly a DBI issue.
However I've had experience going through such a merry-go-round on a Sun
box, so I can sympathize.
What I've found works is
- do most of the install procedure only through your local account, not root
- carefully read the steps in
20k rows can be quite a lot of data, especially with many large columns.
I've been dealing with performance issues with tens of thousands of rows in
Informix, and it can be quite slow.
However, LOAD / UNLOAD is just about as slow as DBI. Those are the Informix
commands to read from / dump to a fi
mailing list.
Books have been suggested recently and are mentioned in perl.org. For
instance, _Programming Perl_ and _Perl Cookbook_.
-Will
-Original Message-
From: Brandon Metcalf [mailto:[EMAIL PROTECTED]
Sent: Tuesday 29 March 2005 17:59
To: Rutherdale, Will
Cc: dbi-users@perl.o
For the same reason you wouldn't modify data in a C structure belonging to
an API you're using. It violates the general software engineering
principles of information hiding and encapsulation. There are all kinds of
reasons putting your own data into an API's structure is bad, for instance
if the
Whoops. I mean selectall_arrayref() (for the general case).
-Will
-Original Message-
From: Rutherdale, Will
Sent: Friday 25 February 2005 12:26
To: dbi-users@perl.org
Subject: RE: how to fetch all records
The simplest is $dbh->selectrow_arrayref().
It's documented in the
The simplest is $dbh->selectrow_arrayref().
It's documented in the DBI man page.
-Will
-Original Message-
From: Tiffany Thang [mailto:[EMAIL PROTECTED]
Sent: Friday 25 February 2005 12:23
To: dbi-users@perl.org
Subject: how to fetch all records
Is there another way of fetching all ta
I don't understand the problem statement. Are you experiencing undesired
truncation, or are you wishing to have strings truncated but not getting it?
The ChopBlanks attribute on a database handle or statement handle controls
truncating of fixed char columns, as documented in the DBI man page.
I'
quote() is normally used like this (for instance):
my $stmt = "UPDATE mytable SET name=" . $dbh->quote("fred") . "WHERE age=3";
That is, the quote() function *puts* the quotes in. Try
$ man DBI
for more information.
The other part: I'm rusty on Oracle, but the query
SELECT 'Rows returned:'
doesn
This is a Perl basics question, and I might answer it a bit differently from
others.
Assuming you did this earlier:
$obj->{dbh} = DBI->connect( ... );
Then $obj->{dbh} is now the reference (handle) representing your DBI
connection. You can then say:
foo( $obj->{dbh} );
And then
sub fo
Hi.
I have two different platforms for which I'm installing and running Perl DBI
and DBD::Informix. One is a Solaris 7 system with Perl 5.6.1, and the other
is Solaris 8 with Perl 5.8.3.
Everything runs fine, including an application I've written that uses DBI
and DBD::Informix, with almost no h
I owe you a great big Thank-you, Jonathan.
I succeeded in applying the patches you described. They worked beautifully.
-Will
BTW I've noticed a couple of problems with installation in my local
environment here. If I confirm them, how soon should I try to send the
email before the next release
r 2004 00:47
To: Rutherdale, Will
Cc: [EMAIL PROTECTED]; Reidy, Ron
Subject: Re: Losing Precision from FLOAT in DBD::Informix
An SQL FLOAT in Informix is equivalent to a C double. That means that the
loss of precision is not really excusable - and is not a problem in the
database. I'd virtually
Hi.
I'm reasonably experienced with Perl and with databases but new to Perl-DBI.
I'm trying to write a conversion program from a legacy DB at work and
discovered that some values weren't copied accurately. The columns involved
are declared FLOAT.
It's an Informix DB running on Solaris.
I've
66 matches
Mail list logo