cancel
Showing results for 
Search instead for 
Did you mean: 

"skip locked" is supported in SAP ASE 16 or not

Abhishek_Jordan
Explorer
0 Kudos

Hello,

Could you please provide confirmation as to whether "skip locked" is supported in SAP ASE 16 or not? It is used with select for update query in other databases. is there any alternative in SAP ASE 16?. If "skip locked" is not supported, is "read past" an alternative to that?

Regards

AJ

Accepted Solutions (1)

Accepted Solutions (1)

Mark_A_Parsons
Contributor

Looking back through all of the manuals I have I can confirm that readpast has been available since ASE 12.5.1 and that dates back almost 2 decades (readpast may have been available in earlier 12.0, 10.x and 4.x versions but I just don't have those manuals in front of me).

Current ASE 16.0 documentation:

Transact-SQL Guide: Readpast Locking for Queue Processing

Refernece Manual: Commands (see entries for select, delete, insert, readtext, update, writetext)

If this doesn't answer your question then please update your post with more details of what you're looking for. An example of how readpast doesn't do what you want would also be helpful.

Abhishek_Jordan
Explorer
0 Kudos

Hello Mark,

Can you please also help me with a few more Queries as mentioned below:

1)is skip locked available in sap ASE 16

2)what is select for update and readpast and how it is used

3)what is the difference between select for update and readpast

Regards

AJ

Mark_A_Parsons
Contributor
0 Kudos

1) the phrase skip locked does not show up anywhere in the ASE documentation; you haven't told us what skip locked is or shown how it's used so I ran a quick web search and reviewing a couple hits it appears (to me) that skip locked is the same as ASE's readpast

2) in addition to the link I provided earlier (re: Transact-SQL Guide: Readpast Locking for Queue Processing) see Reference Manual: Commands (select - Using select for update) and Reference Manual: Commands (select - Using readpast)

3) in a nutshell: select for update obtains exclusive locks on rows processed by the select (the assumption being that a follow-on query is going to modify said locked rows); readpast allows the select to read past (ie, skip over) any locks held by other processes (without readpast the select would stop and wait for the locks, held by other processes, to be released)

Answers (0)