13. Understanding the Locking System : User-Controlled Locking--SET LOCKMODE : The MAXLOCKS Value : Change MAXLOCKS Value with SET LOCKMODE
 
Share this page                  
Change MAXLOCKS Value with SET LOCKMODE
The following statement changes the number of pages in the EMP table that can be locked during a transaction to 70:
set lockmode on emp where maxlocks = 70;
With the new MAXLOCKS value, the locking system escalates to a table-level lock only after more than twenty pages or rows have been locked in table EMP during a query.