Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Posts
    39

    Unanswered: Can't use "SET LOCK MODE TO" Statemant

    Hi,

    With DB2 SDK 8.2.1, if I try to do a "SET LOCK MODE TO [NOT WAIT|WAIT x|TIMEOUT] I get an error :

    "DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
    SQL0104N An unexpected token "LOCK" was found following "SET CURRENT ".
    Expected tokens may include: "DEGREE". SQLSTATE=42601"

    Has the database to be configured to support SET LOCK MODE statement ?

    Geoffrey
    geoffrey
    - Four J's Development Tools -

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I'd try reading the SQL reference if I were you

  3. #3
    Join Date
    Jun 2004
    Posts
    39
    I've find the following in the DB2 V8 documentation : here

    SET LOCK MODE

    Use the SET LOCK MODE statement to define how the database server handles a process that tries to access a locked row or table.

    This statement is an extension to the ANSI/ISO standard for SQL.
    Syntax
    >>-SET LOCK MODE TO--+-NOT WAIT----------+---------------------><
    '-WAIT--+---------+-'
    '-seconds-'
    geoffrey
    - Four J's Development Tools -

  4. #4
    Join Date
    Apr 2004
    Posts
    54
    set lock timeout not wait

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by geoffrey
    I've find the following in the DB2 V8 documentation : here
    This doesn't look like DB2 documentation to me - it says "Informix" right at the top...

  6. #6
    Join Date
    Jun 2004
    Posts
    39
    Quote Originally Posted by n_i
    This doesn't look like DB2 documentation to me - it says "Informix" right at the top...
    Oops, i was redirect there FROM db2 documentation center !!

    OK, i'll look further


    Edit :

    I've to use SET CURRENT LOCK TIMEOUT" statement. But this one still gives me an error (i've try the exemple from here)

    db2 => SET CURRENT LOCK TIMEOUT 30
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0104N An unexpected token "LOCK TIMEOUT 30" was found following "SET
    CURRENT ". Expected tokens may include: "<space>". SQLSTATE=42601
    Last edited by geoffrey; 10-14-05 at 11:53.
    geoffrey
    - Four J's Development Tools -

Posting Permissions

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