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 > Can't use "SET LOCK MODE TO" Statemant

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-05, 09:15
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
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 -
Reply With Quote
  #2 (permalink)  
Old 10-14-05, 09:41
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'd try reading the SQL reference if I were you
Reply With Quote
  #3 (permalink)  
Old 10-14-05, 09:56
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
I've find the following in the DB2 V8 documentation : here

Quote:
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 -
Reply With Quote
  #4 (permalink)  
Old 10-14-05, 10:01
gardenman gardenman is offline
Registered User
 
Join Date: Apr 2004
Posts: 54
set lock timeout not wait
Reply With Quote
  #5 (permalink)  
Old 10-14-05, 10:42
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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...
Reply With Quote
  #6 (permalink)  
Old 10-14-05, 10:49
geoffrey geoffrey is offline
Registered User
 
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
__________________
geoffrey
- Four J's Development Tools -

Last edited by geoffrey; 10-14-05 at 10:53.
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