473,382 Members | 1,639 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,382 software developers and data experts.

Beginner question: a lock without exceptions?

I'm not experienced in db2, but I have to write some rather complex
processing with stored procedures for db2 on as400.

The database consists of some twenty tables and is prepared in advance
so it does not change, while I run my procedures. I call the
procedures over ODBC from a Microsoft Access and Microsoft Windows
client. The procedures also doesn't write anything into this database,
but all the output goes into "global temporary tables". At the end the
results are sent over ODBC to the client. There are also other users
working on the same database at the same time. I don't know how many
of them and what they do, but it is sure, that they don't change the
data in the tables as well.

Now the problem is, that I sometimes get different results from one
run to another although the database is not changend in the
meantime. The database is changed only over the night.

Is it possible, that someone locks some data and my procedures
silently skips such data without raising any expcetion? I didn't give
any special options in may SQL. I also didn't write any code to catch
the exceptions, so they would stop the program, if they occured.

The processing is rather lenghty, about half an hour, and the error
happens so rarely that I'm quite in a despair to catch it by trial and
error.

Maks Romih
Nov 23 '05 #1
2 1351
I would wonder if things actually are being changed. If they are, and
you require a consistant snapshot, ISOLATION LEVEL might be what you
need. The SQL Reference Volume 1 in "Chapter 1. Concepts" has a section
on "Isolation levels" and "Appendix H. Comparison of isolation levels"
has a chart comparing the different ones.

B.

Nov 23 '05 #2
Thank you for your consideration.

I've come a little closer to the problem, but it seems, still further
from the solution.
The problem is not in locking or other users. That's why I changed the
thread title.

The records get lost in a simple SQL that only copies one temporary
table into another.
The table is about million records, some hundred bytes each record.

I've noticed, that every time, when it happens, the system is somehow
very loaded.
One of the SQL-s in the process that usually finishes in a second, at
that time needs 15 minutes.

But it does finish, everything does finish. Without exception.
And finishes wrong.

Is it possible to give some option or some other way of running my
stored procedures in a more sensitive way, so I would get an exception
if the system is too loaded, or simply somehow raise the "level of
sensitivity". It's hardly credible that the records can be lost so
simply.

Maks Romih.

Nov 24 '05 #3

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

Similar topics

8
by: Shamrokk | last post by:
My application has a loop that needs to run every 2 seconds or so. To acomplish this I used... "Thread.Sleep(2000);" When I run the program it runs fine. Once I press the button that starts the...
14
by: Gary Nelson | last post by:
Anyone have any idea why this code does not work? FileOpen(1, "c:\JUNK\MYTEST.TXT", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Shared) Dim X As Integer For X = 1 To 26 FilePut(1, Chr(X +...
4
by: Yoram Biberman | last post by:
I have a few questions concerning concurrency control. I shall thank whoever can help me. Question #1 ========= Assume the following (concurrent) schedule, in which both transactions run in a...
33
by: aaron | last post by:
I have a question in my class.. hoping to get some help I need to create a program that will print firstName middleName lastName then their initials User will input: John Smith Doe Output:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.