473,738 Members | 5,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DBD::DB2 $sh->prepare () after FixPack 7 upgrade

Hi,

We've been using the perl DBD::DB2 driver on Perl version 5.8.0
(aix_thread_mul ti) for a project we're working on without any problems
until now.

We've been using DBD::DB2 version 0.78 on DB2 Version 8.1 (the db2 cli
reports 8.1.0) and we've recently updated DB2 using FixPack 7. The
project we're working on uses the DB2 driver for some webpages and a
couple of daemon scripts. On the DB2 version without the FixPack the
pages were loading fast and after the upgrade, it takes a lot longer
for the pages to appear on the screen.

We've put some logging around the calls to see how much time it takes,
and we noticed the following:

$DCONN is the result of a $DBI->connect_cach ed () to a DB2 instance
that is running on the local system. The handle was opened using the
options AutoCommit => 1, PrintError => 1, RaiseError => 1. It takes 10
seconds for $DCONN->prepare_cach ed ("SELECT ...") to return. Using
$DCONN->prepare or $DCONN->prepare_cach ed makes no difference in time.
The prepare () on DB2 version 8.1 returned immediately, so I didn't use
prepare_cached. If I execute the same statement in the DB2 CLI it takes
less then a second for the SQL statement so I assume it has nothing to
do with the contents of the database.

Our setup is:
- DB2 version 8.1 with FixPack 7 (CLI reports 8.2.0);
- AIX version 5.2 ML 5, 32 bits.
- Perl version 5.8.0 for aix_thread_mult i;
- DBI version 1.48.

Thanks for your trouble,

Bas.

Nov 12 '05 #1
2 1754
Bas,

Have you activated the database you are connecting to ?

We found that this is virtually essential for web type systems where you
have a small number of intermittent short connections.

Phil

bastb wrote:
Hi,

We've been using the perl DBD::DB2 driver on Perl version 5.8.0
(aix_thread_mul ti) for a project we're working on without any problems
until now.

We've been using DBD::DB2 version 0.78 on DB2 Version 8.1 (the db2 cli
reports 8.1.0) and we've recently updated DB2 using FixPack 7. The
project we're working on uses the DB2 driver for some webpages and a
couple of daemon scripts. On the DB2 version without the FixPack the
pages were loading fast and after the upgrade, it takes a lot longer
for the pages to appear on the screen.

We've put some logging around the calls to see how much time it takes,
and we noticed the following:

$DCONN is the result of a $DBI->connect_cach ed () to a DB2 instance
that is running on the local system. The handle was opened using the
options AutoCommit => 1, PrintError => 1, RaiseError => 1. It takes 10
seconds for $DCONN->prepare_cach ed ("SELECT ...") to return. Using
$DCONN->prepare or $DCONN->prepare_cach ed makes no difference in time.
The prepare () on DB2 version 8.1 returned immediately, so I didn't use
prepare_cached. If I execute the same statement in the DB2 CLI it takes
less then a second for the SQL statement so I assume it has nothing to
do with the contents of the database.

Our setup is:
- DB2 version 8.1 with FixPack 7 (CLI reports 8.2.0);
- AIX version 5.2 ML 5, 32 bits.
- Perl version 5.8.0 for aix_thread_mult i;
- DBI version 1.48.

Thanks for your trouble,

Bas.


Nov 12 '05 #2
Phil,

Thanks for your answer. The database was activated because when the
timeout doesn't occur when I connect using the DB2 CLI.

A collegue used truss to trace the system calls the process produces
and was able to remove the 10 secs. timeout. It seems that after the
upgrade, a db2disp process was activated. This is according to the
documentation. The process sends a kill SIGUSR2 to the db2disp process.
We assume this is done to get a db2 connection.

Our process is not running as the instance user, and is not permitted
to send the SIGUSR2 signal. We reconfigured the database instance to
not start the db2disp process.

I wonder if anyone else had to deal with this issue and if this was
resolved in a later DB2 version.

Thanks,
Bas.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4637
by: Kate Perry | last post by:
I am trying to execute a query on a db2 database using the dbi module. I'm wondering if someone can take a look at my code and tell me what I'm doing wrong. I'm assuming it's a problem with my query, but my query works fine in access, so I don't know. I guess I don't really understand how queries work differently in db2. I typically connect to a sql database. Here is the error I'm getting: Couldn't execute query: SQL0204N "(my userid...
0
2061
by: Hemant Shah | last post by:
Folks, I have DB2 UDB 7.2 EE installed on AIX 5.2 system. I think I am at latest fixpack, see output of lslpp below. I have also installed DB2 UDB 7.2 EE on RedHat Linux 7.3 I believe that is also at the latest fix pack, see rpm output below. The database is on AIX system and on the Linux system it is cataloged as remote database.
8
7744
by: Wonderinguy | last post by:
Hi everybody , I have been trying to execute a simple DB2 stored Procedure from perl. But it doesn't work. Could anybody please help me find out why this is happening : here is my perl script that execute the SP : <snip> my $dbh = DBI->connect( "dbi:DB2:$database","user1","passwd1") || die "cannot connect to db2"; my $callstmt = "CALL SPACESP('DB','TEXAS')"; my $sth = $dbh->prepare($callstmt) || die "can't do
3
4610
by: Samarth | last post by:
Folks, I am calling a DB2 stored procedure through Perl using the DBI:ODBC module. I am not sure if I can do this or not because I have been able to connect to and also issue select statements using DBI:ODBC and also have them run successfully. When it comes to stored procedures, I am not sure whether I can do this through DBI::ODBC or not because the many postings that I have read on calling DB2 stored procedures they have all been...
0
1341
by: Philip Nelson | last post by:
Noticed today that there have been two new versions of the DB2 driver released over the last week.   This is the first time IBM has released an update since October 2001, so to give us two releases in a week is a bit much to cope with <G> !!! 0.77 fixes a number of problems, including one which I reported to IBM (and helped to produce a fix for) involving memory leaks. 0.78 adds some new functionality, for C-style comments...
1
4904
by: Dark | last post by:
Im trying to insert a clob into the database and I get the following error. DBD::DB2::st execute failed: SQL0804N The application program input parameters for the current request are not valid. Reason code "103". If a host variable or S QLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "5", SQLTYPE = "393", SQLLEN = "33", host variable/SQLVAR type = "INPUT". SQLSTATE=07002
4
6474
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to define the servername / hostname in my Perl Progrem.. Here is the code:
0
1419
by: Hemant Shah | last post by:
Folks, Here is my setup: DB2 V8.2 ESE running on Linux with utf-8 code set. Database territory = us Database code page = 1208 Database code set = utf-8 Database country/region code = 1
2
2886
by: Tomas | last post by:
Hey all, I'm trying to parse the output from the get_dbsize_info procedure with a Perl script, using the DBI and the DB2 DBD. Below is the relevant part of the code: my $dbsql = "call get_dbsize_info(?,?,?,?)"; my $dbsqlh = $dbh->prepare($dbsql); $dbsqlh->bind_param_inout(1,\$snapshottimestamp,20,{db2_param_type=>SQL_PARAM_OUTPUT}); $dbsqlh->bind_param_inout(2,\$databasesize,20,{db2_param_type=>SQL_PARAM_OUTPUT});
4
4390
by: Justin | last post by:
Excuted the statement through a SSH connection: db2 import from <filename.ixfof ixf messages /database/stage/ acct_news_asc.txt insert into userid.acct_news_asc And it worked fine. Ran the same command through perl and received an error: SQLErr: SQL0104N An unexpected token "/database/stage/acct_news_asc.txt" was found following
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.