Desmodromic wrote:
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?
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.