472,968 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

DB2 Connect, Dynamic SQL, and chosen Isolation Level

klh
We use DB2 Connect v 7.2 FP7 in Windows NT hitting a OS/390 DB2 v7.1
database. We have a Websphere (java) application that issues dynamic
SQL. Most of the time when we issue dynamic SQL SELECT statements,
like through a DB2 command window, the command will be processed using
a package like SQLLF000 which uses an isolation level of Cursor
Stability. However sometimes in the Websphere application when a
dynamic SELECT statement is issued the command is processed using the
package SQLLC300 which uses an isolation level of Read Stability that
locks all the rows it reads (causing contention with other
applications).

When we performed the binds on the packages for DB2 Connect we used
the defaults. We could rebind the packages to remove the Read
Stability, but I'm sure their may be a situation where we would need
to use Read Stability.

The SELECT statement in question is: SELECT field1, field2, field3
from VIEW1. Where VIEW1 is a view built on a single table like SELECT
field1, field2, field3, field4 from TABLE1 where field4 = 'X'.

I don't know if I have all of the package names listed correctly, but
my question is, how does DB2 decide which package to use for
processing a SELECT statement?

Can we change the SQL statement to influence which package is used?

Should we rebind the package so that it performs Cursor Stability?

Thanks for any insight into this situation.
klh
Nov 12 '05 #1
2 8775
The SQL Reference for Cross-Platform Development
http://www-106.ibm.com/developerwork...206sqlref.html

isolation-clause

WITH RR

RS

CS

UR



The optional isolation-clause specifies the isolation level at which the
select

statement is executed.

v RR - Repeatable Read

v RS - Read Stability

v CS - Cursor Stability

v UR - Uncommitted Read

WITH UR can be specified only if the result table is read-only. If
isolation-clause is

not specified, the default isolation is used with the exception of a default
isolation

level of uncommitted read. With uncommitted read, the default isolation
level of

the statement depends on whether the result table is read-only; if the
result table is

read-only then the default will be UR; if the result table is not read-only
then the

default will be CS. See "Isolation Level" on page 13 for a description of
how the

default is determined.

PM

"klh" <kl*******@kcc.usda.gov> a écrit dans le message de
news:40**************************@posting.google.c om...
We use DB2 Connect v 7.2 FP7 in Windows NT hitting a OS/390 DB2 v7.1
database. We have a Websphere (java) application that issues dynamic
SQL. Most of the time when we issue dynamic SQL SELECT statements,
like through a DB2 command window, the command will be processed using
a package like SQLLF000 which uses an isolation level of Cursor
Stability. However sometimes in the Websphere application when a
dynamic SELECT statement is issued the command is processed using the
package SQLLC300 which uses an isolation level of Read Stability that
locks all the rows it reads (causing contention with other
applications).

When we performed the binds on the packages for DB2 Connect we used
the defaults. We could rebind the packages to remove the Read
Stability, but I'm sure their may be a situation where we would need
to use Read Stability.

The SELECT statement in question is: SELECT field1, field2, field3
from VIEW1. Where VIEW1 is a view built on a single table like SELECT
field1, field2, field3, field4 from TABLE1 where field4 = 'X'.

I don't know if I have all of the package names listed correctly, but
my question is, how does DB2 decide which package to use for
processing a SELECT statement?

Can we change the SQL statement to influence which package is used?

Should we rebind the package so that it performs Cursor Stability?

Thanks for any insight into this situation.
klh

Nov 12 '05 #2
The SQL Reference for Cross-Platform Development
http://www-106.ibm.com/developerwork...206sqlref.html

isolation-clause

WITH RR

RS

CS

UR



The optional isolation-clause specifies the isolation level at which the
select

statement is executed.

v RR - Repeatable Read

v RS - Read Stability

v CS - Cursor Stability

v UR - Uncommitted Read

WITH UR can be specified only if the result table is read-only. If
isolation-clause is

not specified, the default isolation is used with the exception of a default
isolation

level of uncommitted read. With uncommitted read, the default isolation
level of

the statement depends on whether the result table is read-only; if the
result table is

read-only then the default will be UR; if the result table is not read-only
then the

default will be CS. See "Isolation Level" on page 13 for a description of
how the

default is determined.

PM

"klh" <kl*******@kcc.usda.gov> a écrit dans le message de
news:40**************************@posting.google.c om...
We use DB2 Connect v 7.2 FP7 in Windows NT hitting a OS/390 DB2 v7.1
database. We have a Websphere (java) application that issues dynamic
SQL. Most of the time when we issue dynamic SQL SELECT statements,
like through a DB2 command window, the command will be processed using
a package like SQLLF000 which uses an isolation level of Cursor
Stability. However sometimes in the Websphere application when a
dynamic SELECT statement is issued the command is processed using the
package SQLLC300 which uses an isolation level of Read Stability that
locks all the rows it reads (causing contention with other
applications).

When we performed the binds on the packages for DB2 Connect we used
the defaults. We could rebind the packages to remove the Read
Stability, but I'm sure their may be a situation where we would need
to use Read Stability.

The SELECT statement in question is: SELECT field1, field2, field3
from VIEW1. Where VIEW1 is a view built on a single table like SELECT
field1, field2, field3, field4 from TABLE1 where field4 = 'X'.

I don't know if I have all of the package names listed correctly, but
my question is, how does DB2 decide which package to use for
processing a SELECT statement?

Can we change the SQL statement to influence which package is used?

Should we rebind the package so that it performs Cursor Stability?

Thanks for any insight into this situation.
klh

Nov 12 '05 #3

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

Similar topics

11
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to...
0
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...
0
by: klh | last post by:
We use DB2 Connect v 7.2 FP7 in Windows NT hitting a OS/390 DB2 v7.1 database. We have a Websphere (java) application that issues dynamic SQL. Most of the time when we issue dynamic SQL SELECT...
1
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...
9
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...
3
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...
2
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 (...
3
by: RG | last post by:
How can I lookup the current isolation level? Thanks in advance
3
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.