Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    18

    Unanswered: 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.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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"

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •