【问题标题】:SSAS tabular model timeout raised during processing处理期间引发的 SSAS 表格模型超时
【发布时间】:2018-02-27 14:27:57
【问题描述】:

在表格模型上对 Azure 分析服务模型执行完整处理时,处理 10 分钟后出现以下错误:

Failed to save modifications to the server. Error returned: 'Microsoft SQL: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.. The exception was raised by the IDbCommand interface.

Technical Details:
RootActivityId: cd0cfc78-416a-4039-a79f-ed7fe9836906
Date (UTC): 2/27/2018 1:25:58 PM
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.
The command has been canceled.. The exception was raised by the IDbCommand interface.

模型的数据源是 Azure 数据仓库,SSAS 通过 SQL 身份验证对其进行身份验证。当超时发生时,一些分区已经检索了它们的所有行,但其他分区仍在处理中。该模型包含 11 个表,每个表都有一个分区。

在使用 Visual Studio 2015 和 SSMS 2017 进行处理时,我都遇到了错误。我看不到任何具有 10 分钟(600 秒)超时的 SSAS 服务器属性。单独的表处理可以在没有超时问题的情况下完成,因为它们都在 10 分钟内完成。

我尝试在我的表格模型脚本语言 json 文件(即 Model.bim)的 dataSources.connectionDetails 对象中设置 timeout 属性。但是编辑它会删除身份验证凭据,然后重置凭据会删除 timeout 属性。所以我不知道该属性是否与超时错误问题有关。

我正在使用的分区查询表达式示例:

let
    Source = #"SQL/resourcename database windows net;DatabaseName",
    MyQuery = 
    Value.NativeQuery(
        Source,
        "SELECT * FROM [dbo].[MyTable]"
    )
in
    MyQuery

【问题讨论】:

  • 您使用的是现代获取数据体验 (Power Query) 还是旧体验?
  • @GregGalloway 我正在使用现代 Power Query 方法,其中包含本机 SQL 查询。

标签: ssas ssas-tabular azure-analysis-services


【解决方案1】:

感谢 GregGalloway 的提示,我发现可以使用 Power Query M 语言在每个分区的基础上设置超时。

所以我的 TMSL 对象的数据访问部分现在看起来像这样......

model.dataSource 是这样的:

"dataSources": [
  {
    "type": "structured",
    "name": "MySource",
    "connectionDetails": {
      "protocol": "tds",
      "address": {
        "server": "serverName.database.windows.net",
        "database": "databaseName"
      },
      "authentication": null,
      "query": null
    },
    "options": {},
    "credential": {
      "AuthenticationKind": "UsernamePassword",
      "Username": "dbUsername",
      "EncryptConnection": true
    }
  }
]

各个分区查询也是如此(注意CommandTimeout参数):

let
    Source = Sql.Database("serverName.database.windows.net","databaseName",[CommandTimeout=#duration(0, 2, 0, 0)]),
    MyQuery = 
    Value.NativeQuery(
        Source,
        "SELECT * FROM [dbo].[MyTable]"
    )
in
    MyQuery

所以现在我明确地为分区查询设置了 2 小时的超时时间。

【讨论】:

    【解决方案2】:

    数据源 -> 选项:增加 命令超时(默认 600 秒)也可以解决问题:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-08
      • 1970-01-01
      • 2014-12-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多