-- При запуске процессов с невысоким приоритетом определяется нагрузка на сервер. -- Если она высока- есть заблокированные процессы, мало ожидаемое время страницы по любой из нод -- Объем блокировок более 30% (с 40 эксклация блокировок)- ждать минуту и после еще раз проверить -- When you start the process with a low priority is determined by the workload on the server. -- If it is high- blocked processes, low Page life expectancy on any of the nodes -- Lock more 30% (from 40% escalation locks) — wait a minute and then recheck -- The values of the permissible level meters can be set priority -- Important tasks can be run when the counters emerge from the critical values -- Background tasks will wait for values indicative of the comfortable status of the server -- Dmitry Gorchilin 20161018->20161020 digger.dp.ua WHILE EXISTS ( SELECT '*' FROM sys.dm_os_performance_counters where ((counter_name LIKE '%Processes blocked%')AND (cntr_value>0)) OR ((counter_name LIKE '%Page life expectancy%')AND (cntr_value<300)) UNION all select '*' FROM sys.dm_os_performance_counters p1,sys.dm_os_performance_counters p2 where p1.counter_name = 'Lock Blocks Allocated' and p2.counter_name = 'Lock Blocks' AND p1.cntr_value>0 and 30< 100.*p2.cntr_value/p1.cntr_value UNION ALL select '*' FROM sys.dm_os_performance_counters p1,sys.dm_os_performance_counters p2 where p1.counter_name = 'Lock Owner Blocks Allocated' and p2.counter_name = 'Lock Owner Blocks' AND p1.cntr_value>0 and 30<100.*p2.cntr_value/p1.cntr_value ) begin waitfor delay '00:01:00' END