473,769 Members | 5,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Statement Isolation Level

Is there some way to track the isolation level of an indivual SQL
statement submitted via JDBC in a snaphot or some other similar means?
I have JDBC programs that are changing the isolation level via
Connection.setT ransactionIsola tion(int level) method, such as
TRANSACTION_SER IALIZABLE or TRANSACTION_REP EATABLE_READ and I need to
verify that in DB2 at a SQL statement level. I don't see isolation
level in a snapshot for Dynamic SQL.

Mar 10 '06 #1
5 3350
m0****@yahoo.co m wrote:
Is there some way to track the isolation level of an indivual SQL
statement submitted via JDBC in a snaphot or some other similar means?
I have JDBC programs that are changing the isolation level via
Connection.setT ransactionIsola tion(int level) method, such as
TRANSACTION_SER IALIZABLE or TRANSACTION_REP EATABLE_READ and I need to
verify that in DB2 at a SQL statement level. I don't see isolation
level in a snapshot for Dynamic SQL.


I'm not sure if this is what you're looking for, but the CURRENT
ISOLATION register might help you here. Take a look at

http://publib.boulder.ibm.com/infoce...om.ibm.db2.udb
..doc/admin/r0010945.htm

for more information (if that link doesn't work it's under Reference /
SQL / Language elements / Special registers / CURRENT ISOLATION in the
DB2 Info Center).

For example, VALUES CURRENT ISOLATION returns the value of the CURRENT
ISOLATION special register (usually this is blank, indicating that the
default transaction isolation level for the package / session is in
use, unless it's been changed with SET CURRENT ISOLATION).

I'm not sure how the setTransactionI solation method alters the
transaction isolation level so this might not be any help, but it's
worth a shot.

HTH,

Dave.
--

Mar 10 '06 #2
Dave Hughes wrote:

I'm not sure if this is what you're looking for, but the CURRENT
ISOLATION register might help you here. Take a look at

http://publib.boulder.ibm.com/infoce...om.ibm.db2.udb
.doc/admin/r0010945.htm

for more information (if that link doesn't work it's under Reference /
SQL / Language elements / Special registers / CURRENT ISOLATION in the
DB2 Info Center).

For example, VALUES CURRENT ISOLATION returns the value of the CURRENT
ISOLATION special register (usually this is blank, indicating that the
default transaction isolation level for the package / session is in
use, unless it's been changed with SET CURRENT ISOLATION).

I'm not sure how the setTransactionI solation method alters the
transaction isolation level so this might not be any help, but it's
worth a shot.

HTH,

Dave.
--


That is not what I am looking for. I need to see the actual isolation
level of each individual dynamic SQL statement, which can be overridden
for a given connection by "WITH RR" or other means. I also cannot
modify the code.

I ran:
db2pd -database sample -dynamic
and got some interesting output. In one section it lists the SQL
statements in package cache:

Dynamic SQL Statements:
Address AnchID StmtUID NumEnv NumVar NumRef NumExe
Text

0x40A120D0 3 1 1 1 112261 112261
SELECT JOB_LISTENER FROM QRTZ_JOB_LISTEN ERS WHERE JOB_NAME = ? AND
JOB_GROUP = ?

0x409EB400 10 1 1 1 49902 49902
DELETE FROM QRTZ_FIRED_TRIG GERS WHERE INSTANCE_NAME = ?

and also in another section of the report:

Dynamic SQL Environments:
Address AnchID StmtUID EnvID Iso QOpt Blk
0x40A121C0 3 1 1 RR 5 B
0x409EB4E0 10 1 1 RR 5 B
0x409AB420 22 1 1 CS 5 B
0x409ABA50 22 1 2 CS 5 B

But I cannot match up the hex addresses of the SQL statements with the
hex addresses of the Iso (isolation level). (The above is only a
partial list of the actual output).

Mar 11 '06 #3
I just figured it out. The AnchID's match up, not the hex addresses. So
now I can determine the actual isolation level of all the SQL
statements in package cache.

Mar 11 '06 #4
But I don't get this:

Address AnchID StmtUID NumEnv NumVar NumRef NumExe
Text
0x151223D0 195 1 1 1 3 1
SELECT COUNT(*) FROM t WITH
UR
....
Address AnchID StmtUID EnvID Iso QOpt Blk
0x15122490 195 1 1 CS 5 B
....

So, as you see, I ran a simple query with UR isolation explicitly
specified but db2pd indicated it was run using CS level.
Any comment?

-Eugene

Mar 13 '06 #5
Can you open an PMR with DB2 support and report the answer here?

Mar 13 '06 #6

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

Similar topics

3
2768
by: Wolfgang Bachmann | last post by:
We migrated a database from Version 5.1 to 8.1 and are experiencing massive locking problems. We migrated in the following steps: 0) Server 5.2, Clients 5.2: everithing was fine 1) Server 5.2, Clients 6.1: everything still fine 2) Server 8.1, Clients 6.1: here the problem occurs 3) server 8.1, Clients 8.1: not yet done. Steps 1 & 2 were nessecary because there are to many clients spread over to much area to migrate all at once from...
0
1846
by: pulsar | last post by:
Hello, We use db2connect and DRDA to communicate between an AS400 and DB2 UDB V7.2. We have a new needs with an AS400 library that we already used with the isolation level "CS"; now we want to use it sometime with isolation level "UR" in an application an sometimes with isolation level "CS" as usual. We don't use ODBC over db2connect, only db2connect. The command "db2 change isolation to UR" works correctly in the windows command but...
1
2759
by: cwahlmeier | last post by:
I have been researching ADO.NET in order to train our programming staff. I am curious if someone would know what the default isolation level is with and without a transaction. Furthermore, if I specify the isolation level on the transaction object, which one is the most like cursor stability? Is it read commited? Any other opinions/best practices regarding ADO.NET are welcome. I have been reading the redbook DB2 for UDB V8.2 on the...
9
2912
by: yu_sha | last post by:
Hello everyone We have a bunch of components registered under COM+ with 'transaction required' option. On the client we are using iSeries Access 5.2.0, with all possible fixes applied (Service level SI16136, iSeries ODBC driver version 9.00.09.00). Server is DB2/AS400 05.02.0001 (that's what ODBC driver reports. So, I
3
8670
by: Eric Porter | last post by:
Dear All, I have a VB6.COM program using a VB6.COM DLL, which in turn uses ADODB that performs various bits of SQL. I have re-written the VB6.COM DLL in C#.NET (with a VB6 shell), which uses the ADODB.Interop library supplied with .NET. The VB6.COM program above calls this C#.NET library in an effort to perform the equivalent functionality.
2
8137
by: kanda | last post by:
Hello. I am developing the application (VBA&ODBC, to be exact) which periodically calls the stored procedures in the IBM DB2. A few of the procedures require executing with isolation level RR ( ANSI "SERIALIZABLE" ), not the default; default is CS (ANSI "Read Committed")). The procedure language is SQL. According to the documentation, I can adjust procedure *run*-time isolation level by setting *compile*-time dataserver-wide option
8
3520
by: nano2k | last post by:
Hi Shortly, I keep invoices in a table. Occasionally, someone will fire the execution of a stored procedure (SP) that performs several UPDATEs against (potentially) all invoices OLDER than a date that is supplied to the SP as a parameter. The SP is usually a lengthy process (it takes at least 30 mins). The problem is that SQL server 2000 Dev Edition doesn't allow me to insert new invoices that are "younger", while the SP is executing....
3
3274
by: RG | last post by:
How can I lookup the current isolation level? Thanks in advance
3
3835
by: Maryan | last post by:
Hi everybody, there are two ways to change the isolation level: For instance i would like to change the isolation level to rs 1. "db2 change isolation to rs" 2. "db2 set current isolation rs" When i use the first one and then "db2 values current isolation" to verify if the change was successful, i won't get anything. But when i use the second one and then invoke the command "db2 values current isolation", i will see that the...
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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
10043
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...
1
9990
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8869
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 project—planning, coding, testing, and deployment—without 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
7406
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
6672
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();...
1
3956
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
3561
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.