【问题标题】:How to execute a DMV query in SSAS through a powershell runbook from Azure Automation?如何通过 Azure 自动化的 Powershell Runbook 在 SSAS 中执行 DMV 查询?
【发布时间】:2021-04-28 16:12:04
【问题描述】:

我正在尝试打开与 ssas 服务器连接 并执行 dmv 查询,以便通过 dmv 查询 提取表元数据Azure 自动化帐户中的strong>powershell runbook。

我已经编写并测试了一个似乎在我的本地机器工作正常的powershell脚本,但是当我在云 作为 azure Runbook,似乎不可能打开连接。

我用这个代码打开了与ssas的连接:

 $connectionString = "Provider=msolap; Data Source=asazure://westeurope.asazure.windows.net/servername;User Id={0};Password={1}; Initial Catalog=DataModel" -f $ssasUser, $ssasPassword;
    
 ## Connect to the data source and open SSAS
 $connection = New-Object System.Data.OleDb.OleDbConnection $connectionString
 $connection.Open()

我似乎无法打开连接,因为我运行此代码时收到以下错误

 System.Management.Automation.MethodInvocationException: Exception calling "Open" with "0" argument(s): "The .Net Framework Data Providers require Microsoft Data Access Components(MDAC).  Please install Microsoft Data Access Components(MDAC) version 2.6 or later."

在网上搜索,我发现的唯一解决方案似乎是简单地下载并安装 MDAC sdk,但这在云上运行时无法完成。

我需要帮助来修复此错误或找到替代解决方案。 谢谢。

【问题讨论】:

    标签: powershell azure-automation dmv analysisservices mdac


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-24
      • 2022-11-11
      • 1970-01-01
      • 2018-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-07
      相关资源
      最近更新 更多