PowerShellからSQLServerにログインができない

大谷仁茂 21 Reputation points
2020-06-16T02:12:04.257+00:00

お世話になっております。

SQLServer(2014 Express)で作成したDBにPowerShellにてログインしたところ、以下のようなエラーが出力されます。

ーーーーーーーーーーーー

> $sqlserver=***********
>Invoke-Sqlcmd -ServerInstance $sqlserver -Database master -InputFile D:\Work\test.sql
Invoke-Sqlcmd : ファイルまたはアセンブリ 'Microsoft.SqlServer.BatchParser, Version=12.0.0.0, Culture=neutral, PublicKey
Token=89845dcd8080cc91'、またはその依存関係の 1 つが読み込めませんでした。指定されたファイルが見つかりません。
発生場所 行:1 文字:1

  • Invoke-Sqlcmd -ServerInstance $sqlserver -Database master -InputFile "D:\Work\te ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Invoke-Sqlcmd], FileNotFoundException
  • FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.SqlServer.Management.PowerShell.GetScriptComma
    nd
    ーーーーーーーーーーーー

以下サイトにて、“drive:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.AnalysisServices.AdomdClient”を確認するように記載がありますが、対象のファイルがありませんでした。また、対象がSQLServer2016と書かれているので、以下サイトで解決するのかが不明です。

https://support.microsoft.com/en-us/help/4134601/could-not-load-file-assembly-microsoft-analysisservices-adomdclientui

上記URLのほかに何か対処法等はあるかご教示ください。

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,882 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dave Patrick 426K Reputation points MVP
    2020-06-16T02:27:59.233+00:00

    QnA forums are currently english only.

    SQL Server and PowerShell is not currently supported here on QnA. They're actively answering question in dedicated forums here.

    https://social.msdn.microsoft.com/Forums/sqlserver/ja-JP/home?forum=sqlserverja

    https://social.technet.microsoft.com/Forums/windows/ja-JP/home?forum=powershellja

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. 大谷仁茂 21 Reputation points
    2020-06-16T04:20:04.483+00:00

    I am sorry.
    I will throw QA again to the site you are guided to

    0 comments No comments