Results 1 to 5 of 5

Thread: Locks in DB2

  1. #1
    Join Date
    Oct 2007
    Posts
    5

    Red face Unanswered: Locks in DB2

    hello,

    Is there any way to remove locks on the table in the db2?
    I tried to execute snapshot command and got couple of tables locked on the schema.

    I was just wondering if there is any way to remove the locks as I am not able to execute some java based commands on the database.

    regards
    Pankaj

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can have the application holding the locks do a SQL COMMIT, or you can FORCE the application connection that is holding the locks (see Command Reference manual).
    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
    Oct 2007
    Posts
    5
    Thanks for the information. I tried to kill the locks by FORCE application but could not execute it as I receive below error.

    db2 => force application (81)
    SQL1096N The command is not valid for this node type.


    Any idea?

    Best regards
    Pankaj

  4. #4
    Join Date
    Jan 2008
    Posts
    88
    See you can always deferred the locking.
    if u r on version 8.2 and higher you can use the registry variables

    DB2_EVALUNCOMMITED=YES
    and DB2_SKIPINSERTED=YES... you can read about these more on internet or manuals. But do test it before going to change in production systems

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by pankaj.insatyam
    Thanks for the information. I tried to kill the locks by FORCE application but could not execute it as I receive below error.

    db2 => force application (81)
    SQL1096N The command is not valid for this node type.


    Any idea?

    Best regards
    Pankaj
    Try using the Command Window instead of Command Processor:

    db2 "force application (81)"
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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