Within DB2 v8.1 is it possible to force all database sessions for a
certain user to use a specific isolation level? Basically, I have a
readonly user that I want to force to use an isolation level of
Uncommitted Read for every database session.
I am thinking along the lines of something equivalent to the
sysdbopen() stored procedure in Informix XPS. Any ideas?
Thanks in advance,
Mike
Mark A - 11 Jan 2008 04:06 GMT
> Within DB2 v8.1 is it possible to force all database sessions for a
> certain user to use a specific isolation level? Basically, I have a
[quoted text clipped - 7 lines]
>
> Mike
Depending on what DB2 client you are using, you might be able to set the
default isolation in the client configuration file. I believe it easy to do
with type 2 client, but not sure about type 4.
Dave Hughes - 11 Jan 2008 06:00 GMT
> Within DB2 v8.1 is it possible to force all database sessions for a
> certain user to use a specific isolation level? Basically, I have a
[quoted text clipped - 3 lines]
> I am thinking along the lines of something equivalent to the
> sysdbopen() stored procedure in Informix XPS. Any ideas?
Via the GUI (this might be slightly different as I've only got v8 to
play with here, but you should get the general idea):
* Start the DB2 Configuration Assistant (db2ca)
* Right click on the connection you wish to alter
* Select "CLI Settings..." from the menu
* Select the "Settings" tab in the window that appears
* Click the "Add..." button
* Select "TXNIsolation" from the list
* Select "Read Uncommitted" from the radio buttons below
* Click OK a couple of times
From the command line:
Add the line "TXNISOLATION=1" (without the quotes) to the relevant
section of the db2cli.ini file (default location is "C:\Program
Files\IBM\SQLLIB" on Windows, or "~db2inst1/sqllib/cfg" on Linux). For
example:
[MYDB]
DBALIAS=MYDB
TXNISOLATION=1
Cheers,
Dave.