【问题标题】:Azure Runbook runs in Test Pane, not when scheduledAzure Runbook 在测试窗格中运行,而不是按计划运行
【发布时间】:2019-08-09 02:46:45
【问题描述】:

我们在 Azure 自动化中创建了一个运行手册,它在测试窗格中成功,但在计划时失败。这是一个 PowerShell 脚本

在存储过程中包含命令超时

存储过程应该删除索引,预计它也会在调度时成功。我们收到此错误:

Exception calling "ExecuteNonQuery" with "0" argument(s): "Execution Timeout Expired. The timeout period elapsed prior 
 to completion of the operation or the server is not responding."
 At SQL_Agent_SprocJob:26 char:26
 + 
 + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
 + FullyQualifiedErrorId : SqlException

【问题讨论】:

  • 编辑了我的答案。请检查 DTU 放大。

标签: azure stored-procedures automation


【解决方案1】:

试试看是否可行

$SQLCommand.CommandTimeout=0 

有时当您的 DTU 太低时也会发生这种情况,请尝试将其放大。

【讨论】:

    猜你喜欢
    • 2021-11-13
    • 2021-03-11
    • 2016-12-07
    • 2021-12-28
    • 2020-09-22
    • 1970-01-01
    • 2020-05-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多