• <legend id='4yIF7'><style id='4yIF7'><dir id='4yIF7'><q id='4yIF7'></q></dir></style></legend>

    • <bdo id='4yIF7'></bdo><ul id='4yIF7'></ul>
    <i id='4yIF7'><tr id='4yIF7'><dt id='4yIF7'><q id='4yIF7'><span id='4yIF7'><b id='4yIF7'><form id='4yIF7'><ins id='4yIF7'></ins><ul id='4yIF7'></ul><sub id='4yIF7'></sub></form><legend id='4yIF7'></legend><bdo id='4yIF7'><pre id='4yIF7'><center id='4yIF7'></center></pre></bdo></b><th id='4yIF7'></th></span></q></dt></tr></i><div id='4yIF7'><tfoot id='4yIF7'></tfoot><dl id='4yIF7'><fieldset id='4yIF7'></fieldset></dl></div>

      <small id='4yIF7'></small><noframes id='4yIF7'>

    1. <tfoot id='4yIF7'></tfoot>
      1. 如何防止 Sql Server 作业同时运行

        时间:2024-04-15
          <bdo id='cVnVD'></bdo><ul id='cVnVD'></ul>
        • <tfoot id='cVnVD'></tfoot>

            <i id='cVnVD'><tr id='cVnVD'><dt id='cVnVD'><q id='cVnVD'><span id='cVnVD'><b id='cVnVD'><form id='cVnVD'><ins id='cVnVD'></ins><ul id='cVnVD'></ul><sub id='cVnVD'></sub></form><legend id='cVnVD'></legend><bdo id='cVnVD'><pre id='cVnVD'><center id='cVnVD'></center></pre></bdo></b><th id='cVnVD'></th></span></q></dt></tr></i><div id='cVnVD'><tfoot id='cVnVD'></tfoot><dl id='cVnVD'><fieldset id='cVnVD'></fieldset></dl></div>

                <tbody id='cVnVD'></tbody>
                <legend id='cVnVD'><style id='cVnVD'><dir id='cVnVD'><q id='cVnVD'></q></dir></style></legend>

                <small id='cVnVD'></small><noframes id='cVnVD'>

                  本文介绍了如何防止 Sql Server 作业同时运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的 SQL 代理中有一些预定的作业:

                  I have some scheduled jobs in my SQL Agent:

                  • Job1,每 2 分钟执行一次
                  • Job2,每 10 分钟执行一次
                  • Job3,每 15 分钟执行一次

                  如您所见,多个作业可以同时运行.当这些作业同时运行时,会导致 CPU 使用率达到 100%.

                  As you can see, multiple jobs can run simultaneously. When these jobs do run simultaneously, it is causing the CPU usage to go to 100%.

                  有解决办法吗?有没有办法控制并发运行的作业数量?注意:我需要这些作业在适当的时间内大约运行.

                  Is there a solution? Is there a way to control the number of jobs running concurrently? Note: I need these jobs to run approximately in their appropriate period.

                  推荐答案

                  通过 sp_getapplock

                  您要求用户控制并发,这通常是最好的方法.

                  You're asking for user-controlled concurrency and this is usually the best way.

                  这允许您在锁已被另一个作业持有时等待或中止.我们在一两个地方使用它来阻止多个用户强迫同一任务重叠运行.效果很好.

                  This allows you to wait or abort if the lock is already held by another job. We use it in one or 2 places to stop multiple users forcing the same task to run overlapping. It works well.

                  这篇关于如何防止 Sql Server 作业同时运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:MySQL 临时表是共享资源吗? 下一篇:如何限制 SQL 中每个字段值的行数?

                  相关文章

                    <i id='Z0kq9'><tr id='Z0kq9'><dt id='Z0kq9'><q id='Z0kq9'><span id='Z0kq9'><b id='Z0kq9'><form id='Z0kq9'><ins id='Z0kq9'></ins><ul id='Z0kq9'></ul><sub id='Z0kq9'></sub></form><legend id='Z0kq9'></legend><bdo id='Z0kq9'><pre id='Z0kq9'><center id='Z0kq9'></center></pre></bdo></b><th id='Z0kq9'></th></span></q></dt></tr></i><div id='Z0kq9'><tfoot id='Z0kq9'></tfoot><dl id='Z0kq9'><fieldset id='Z0kq9'></fieldset></dl></div>

                    <small id='Z0kq9'></small><noframes id='Z0kq9'>

                    • <bdo id='Z0kq9'></bdo><ul id='Z0kq9'></ul>

                    <tfoot id='Z0kq9'></tfoot><legend id='Z0kq9'><style id='Z0kq9'><dir id='Z0kq9'><q id='Z0kq9'></q></dir></style></legend>