Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    KC
    Posts
    3

    Unanswered: How to delete without locking table?

    UDB V8.1 Fixpack 2 I believe running on AIX(not sure what version).

    I am trying to figure out if I can run a delete that will not lock the whole table. I've looked at the documentation and cannot figure out if using the WITH *ISOLATION LEVEL CODE* will work for me. Could someone help me understand the isolation levels and is what I want to do possible? I'm trying to delete old data and do an online load at the same time.

    Thanks,

    Josh

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: How to delete without locking table?

    Originally posted by damark
    UDB V8.1 Fixpack 2 I believe running on AIX(not sure what version).

    I am trying to figure out if I can run a delete that will not lock the whole table. I've looked at the documentation and cannot figure out if using the WITH *ISOLATION LEVEL CODE* will work for me. Could someone help me understand the isolation levels and is what I want to do possible? I'm trying to delete old data and do an online load at the same time.

    Thanks,

    Josh
    Actually, I think it's LOAD that locks the table, not DELETE. You're saying you run them at the same time - don't.

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How to delete without locking table?

    A Delete will take a lock, and whether it is row or table depends on many factors, primarily on the LOCKLIST and MAXLOCKS database config parms ...

    If you want to avoid table-level locks, one option is to use positioned deletes using a cursor ...

    If you want to use the db2 LOAD command to add data into the tabel when the delete is happening, it is not yet supported ...

    FP4 introduced the concept of ONLINE IMPORT which you may experiment for your scenario

    HTH

    Sathyaram




    Originally posted by damark
    UDB V8.1 Fixpack 2 I believe running on AIX(not sure what version).

    I am trying to figure out if I can run a delete that will not lock the whole table. I've looked at the documentation and cannot figure out if using the WITH *ISOLATION LEVEL CODE* will work for me. Could someone help me understand the isolation levels and is what I want to do possible? I'm trying to delete old data and do an online load at the same time.

    Thanks,

    Josh
    Last edited by sathyaram_s; 03-24-04 at 12:31.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Mar 2004
    Location
    KC
    Posts
    3
    Thank you for the information.

Posting Permissions

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