We are in the process of upgrading from ASE 11.5 to ASE 12.0
In ASE 11.5,
Our developers use the following to get a table level exclusive lock :
update T1 set C1 = xxx where 1 = 3
This grants a table level exclusive lock.
In ASE 12.0,
The same stuff grants a level exclusive lock on a page and a Exclusive
Intent lock on the table.
So, the developers are planning to start using the lock table command.
I do not know the exact details regarding their programming ... why
they are doing this, what isolation level they need etc. etc.
But I am surprised at the behaviour of ASE 12.
I created a test table T1 with one column C1.
There were no indexes.
I inserted one row in the table with C1 = 1.
The table had Allpages locking scheme.
When I gave the following :
update T1 set C1 = 2 where C1 = 1 /* this results in 1 row updated
I got a page level exclusive lock and a table level exclusive intent
The Performance and Tuning Manual says on page 26-8 (bottom of page) :
"If no index exists on any of the search arguments, Adaptive Server
must acquire a table-level lock."
Either the manual is incorrect or I am missing something.