473,545 Members | 318 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 3332
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
2753
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...
0
1823
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...
1
2743
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...
9
2898
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
8658
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...
2
8110
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...
8
3490
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...
3
3249
by: RG | last post by:
How can I lookup the current isolation level? Thanks in advance
3
3802
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...
0
7456
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...
0
7390
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...
0
7802
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...
0
7744
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...
0
5960
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...
1
5320
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...
0
3442
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...
1
1869
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
1
1010
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.