468,278 Members | 1,566 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,278 developers. It's quick & easy.

Isolation Level on DB2 UDB 9.1.1

RG
How can I lookup the current isolation level?

Thanks in advance
Jan 13 '08 #1
3 3013
RG wrote:
How can I lookup the current isolation level?

Thanks in advance
From SQL, you can query the CURRENT ISOLATION special register. For
example:

$ db2 VALUES CURRENT ISOLATION

1
--
1 record(s) selected.

However, if CURRENT ISOLATION hasn't been explicitly set, this will
simply return a blank string, as shown above (indicating that the
default isolation level for the package should be used). You can also
set the current isolation level in a similar fashion:

$ db2 SET CURRENT ISOLATION UR
DB20000I The SQL command completed successfully.

$ db2 VALUES CURRENT ISOLATION

1
--
UR

1 record(s) selected.

Or specify the isolation level for a query explicitly by appending
something like "WITH UR" to the SQL. See the following link for more on
the CURRENT ISOLATION register:

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

Dave.
Jan 14 '08 #2
On Jan 13, 12:12 pm, "RG" <nob...@nowhere.comwrote:
How can I lookup the current isolation level?

Thanks in advance
I have a hunch that there's more to this question. I'm just guessing,
but I bet you want to find the current isolation level for active SQL
statements.

The only way I've found to get this is using the db2pd command, and it
only works for dynamic SQL.

db2pd -db <dbname-dynamic will get you there. It's somewhat of a
pain as you have to correlate different sections of the output using
StmtUID. The column you may be after is the one labeled 'Iso'.
Jan 14 '08 #3
fr*****@gmail.com wrote:
The only way I've found to get this is using the db2pd command, and it
only works for dynamic SQL.
Correct - because static SQL uses the isolation level that was specified
when the package was (re)bound.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Jan 14 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Markus Breuer | last post: by
1 post views Thread by cwahlmeier | last post: by
9 posts views Thread by yu_sha | last post: by
3 posts views Thread by Eric Porter | last post: by
5 posts views Thread by m0002a | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.