Hello,
I am working on a small script that pulls user metrics from databases on a number of
different servers and pushes them into a 'metrics warehouse' of sorts for use in trend
analysis among other things. I am having trouble with my insert statement and would
like some help from all of
Bart Kersteter [mailto:[EMAIL PROTECTED] wrote:
I am using this statement to try and insert the data:
*---
my ($userid, $year, $week, $cpu, $io);
$source_sth-bind_columns(\$userid, \$year, \$week, \$cpu, \$io);
my $insert_sql = qq{ insert
Here's the full main loop script, I'm still relatively new to DBI, so I
may have messed things up a bit. I have gone through the perldocs a few
times.
my $db_list = new IO::File( /home/oracle/utils/metrics_db_list.txt)
or die Can't open oratab file;
while ($db_list) {
my @db_info =
I don't see anything glaringly wrong, and in fact I don't know why it's
not working for you. Maybe I'm just overlooking something, but why not
include the $orasid and $server as bind variables? Like this:
my $insert_sql = qq { insert into user_history_stats (database,
server, year, week,
On Tue, 17 Aug 2004, Bart Kersteter wrote:
Here's the full main loop script, I'm still relatively new to DBI,
so I may have messed things up a bit. I have gone through the
perldocs a few times.
Your understanding of DBI looks pretty good to me. I'm not sure
what's causing the bound variable
Thanks to all for your suggestions... I've finally gotten things working. The
following is a working example. The one issue I have left to handle is to add some
error chceking and parameterize a few things to make the script more transportable.
One little glitch is that the final fetch for
On Tue, 17 Aug 2004, Bart Kersteter wrote:
Thanks to all for your suggestions... I've finally gotten things
working. The following is a working example. The one issue I
have left to handle is to add some error chceking and parameterize
a few things to make the script more transportable.
From: Bart Kersteter [EMAIL PROTECTED]
Date: 2004/08/17 Tue PM 03:06:53 GMT
my $db_list = new IO::File( /home/oracle/utils/metrics_db_list.txt)
or die Can't open oratab file;
while ($db_list) {
my @db_info = split(/:/);
my $orasid = $db_info[0];
my $server = $db_info[1];
May