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 2 8810
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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 (...
|
by: RG |
last post by:
How can I lookup the current isolation level?
Thanks in advance
|
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...
|
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,...
|
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$) {
}
...
|
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...
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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...
| | |