473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Stored Procedure

Hi All:

I use db2 v8 fp 14 on Aix.

I am facing problems with a stored procedure that is causing a lot of
locks and also goes in the lock wait state ending up hanging the
application.
Tried using the UR isolation mode but it did not help.

Can some one please suggest me how to debug this problem and any
specific step or areas that I need to look at..??

Thanks and Regards,
Racerx...

Jul 2 '07 #1
3 3152
On Jul 2, 8:39 am, Racerx <p.paingan...@gmail.comwrote:
Hi All:

I use db2 v8 fp 14 on Aix.

I am facing problems with a stored procedure that is causing a lot of
locks and also goes in the lock wait state ending up hanging the
application.
Tried using the UR isolation mode but it did not help.

Can some one please suggest me how to debug this problem and any
specific step or areas that I need to look at..??

Thanks and Regards,
Racerx...
Not sure if you realize this, but isolation level only affects select
statements and how long locks are being held by those select
statements (except that select with UR will ignore other locks held by
others). Inserts, updates, and deletes will not ignore locks held by
others even with UR.

If your stored procedure recieves a lock-timeout (error -911 RC=68)
then it was waiting on some locks held by another applicaiton (which
is likely the culprit). If your applicaiton just hangs indefinitely,
then your locktimeout parmerter for the db is probably set to -1 (wait
indefinitely). Try changing it to about 30 seconds (db2 update db cfg
using LOCKTIMEOUT 30). this will not necessarily solve the problem,
but at least your apps will not hang. You need to find out which other
application is holding the locks for more than 30 seconds.

Generally, locks are released when an application issues a COMMIT. You
cannot be too rich, too thin, or commit too often.

Jul 4 '07 #2
On Jul 4, 7:47 am, Mark A <m00...@yahoo.comwrote:
On Jul 2, 8:39 am, Racerx <p.paingan...@gmail.comwrote:
Hi All:
I use db2 v8 fp 14 on Aix.
I am facing problems with a stored procedure that is causing a lot of
locks and also goes in the lock wait state ending up hanging the
application.
Tried using the UR isolation mode but it did not help.
Can some one please suggest me how to debug this problem and any
specific step or areas that I need to look at..??
Thanks and Regards,
Racerx...

Not sure if you realize this, but isolation level only affects select
statements and how long locks are being held by those select
statements (except that select with UR will ignore other locks held by
others). Inserts, updates, and deletes will not ignore locks held by
others even with UR.

If your stored procedure recieves a lock-timeout (error -911 RC=68)
then it was waiting on some locks held by another applicaiton (which
is likely the culprit). If your applicaiton just hangs indefinitely,
then your locktimeout parmerter for the db is probably set to -1 (wait
indefinitely). Try changing it to about 30 seconds (db2 update db cfg
using LOCKTIMEOUT 30). this will not necessarily solve the problem,
but at least your apps will not hang. You need to find out which other
application is holding the locks for more than 30 seconds.

Generally, locks are released when an application issues a COMMIT. You
cannot be too rich, too thin, or commit too often.
The Lock timeout parameter is set to 90...still i am facing the problem

Jul 5 '07 #3
On Jul 5, 1:30 am, Racerx <p.paingan...@gmail.comwrote:
On Jul 4, 7:47 am, Mark A <m00...@yahoo.comwrote:


On Jul 2, 8:39 am, Racerx <p.paingan...@gmail.comwrote:
Hi All:
I use db2 v8 fp 14 on Aix.
I am facing problems with a stored procedure that is causing a lot of
locks and also goes in the lock wait state ending up hanging the
application.
Tried using the UR isolation mode but it did not help.
Can some one please suggest me how to debug this problem and any
specific step or areas that I need to look at..??
Thanks and Regards,
Racerx...
Not sure if you realize this, but isolation level only affects select
statements and how long locks are being held by those select
statements (except that select with UR will ignore other locks held by
others). Inserts, updates, and deletes will not ignore locks held by
others even with UR.
If your stored procedure recieves a lock-timeout (error -911 RC=68)
then it was waiting on some locks held by another applicaiton (which
is likely the culprit). If your applicaiton just hangs indefinitely,
then your locktimeout parmerter for the db is probably set to -1 (wait
indefinitely). Try changing it to about 30 seconds (db2 update db cfg
using LOCKTIMEOUT 30). this will not necessarily solve the problem,
but at least your apps will not hang. You need to find out which other
application is holding the locks for more than 30 seconds.
Generally, locks are released when an application issues a COMMIT. You
cannot be too rich, too thin, or commit too often.

The Lock timeout parameter is set to 90...still i am facing the problem- Hide quoted text -

- Show quoted text -
The problem is with the application holding the locks, not with the
one that gets the -911 RC=68.

During the 90 seconds while your application is waiting on a lock to
be released (before it gets a locktimeout error) run a snapshot for
locks on the database to see who is holding the locks you need. The
application who is holding the locks is the offending application and
most likely is the one that needs to be changed. You may have to try
this several times to make sure you get the snapshot when your
application is in lockwait mode.

Jul 7 '07 #4

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

Similar topics

3
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
8
by: Thomasb | last post by:
With a background in MS SQL Server programming I'm used to temporary tables. Have just started to work with DB2 ver 7 on z/OS and stumbled into the concept of GLOBAL TEMPORARY TABLE. I have...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
0
by: Amber | last post by:
Stored procedures are faster and more efficient than in-line SQL statements. In this article we will look at two SQL Server stored procedures; one using an input parameter and one not, and see how...
3
by: kd | last post by:
Hi All, How to debug a stored procedure? Thanks, kd
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.