If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Trigger Isolation Level

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-01-05, 11:35
karcheee karcheee is offline
Registered User
 
Join Date: May 2005
Posts: 18
Trigger Isolation Level

Im using DB2 Universal Database Version 7.2.
Why can't I do the following in a Trigger???

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

I would like to create Triggers in DB2 that use Isolation Level UR... Is this possible to be done in DB2?? - I want to avoid deadlock errors with my triggers.
Reply With Quote
  #2 (permalink)  
Old 11-01-05, 13:55
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
I am not sure if you can set the isolation level on a trigger, but try adding "WITH UR" at the end of each select statement. You cannot use UR on an SQL statement that changes data (or it will have no effect).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 11-01-05, 16:51
karcheee karcheee is offline
Registered User
 
Join Date: May 2005
Posts: 18
tried that, didnt work.

but i've found articles that talk about db2 and setting isolation levels as i tried to do in my previous post

http://publib.boulder.ibm.com/infoce...mstsettraj.htm
"If the SET TRANSACTION statement is run in a trigger, the isolation level specified applies to all subsequent SQL statements until another SET TRANSACTION statement occurs or until the trigger completes, whichever happens first"
Reply With Quote
  #4 (permalink)  
Old 11-02-05, 10:06
juliane26 juliane26 is offline
Registered User
 
Join Date: Oct 2005
Posts: 109
what are you trying to do with your trigger ?
UR applies only for read-only operations, the first insert/update/delete will upgrade to CS.
__________________
Juliane
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On