MSSQL. Организация блокировок с пропуском заблокированных

Версия 1.3 от Alexandr Fokin на 2024/06/07 23:55

  

 Пессимистичная блокировка 
 sp_getapplock
https://learn.microsoft.com/ru-ru/sql/relational-databases/system-stored-procedures/sp-getapplock-transact-sql?view=sql-server-ver16
Prevent multiple users from running the same SQL Server stored procedure at the same time
https://www.mssqltips.com/sqlservertip/3202/prevent-multiple-users-from-running-the-same-sql-server-stored-procedure-at-the-same-time/
Блокировка через основной механизм БДBegin;

 select *
 from table with (UPDLOCK, READPAST)

 --action

Commit;
 
Рекомендательные блокировки  
   

Внутренние ссылки:

Дочерние страницы:
Обратные ссылки:

Теги:
Создал(а) Alexandr Fokin 2024/06/07 23:49