小编use*_*720的帖子

Powershell x86:无法加载文件或程序集 Microsoft.SqlServer.BatchParser

当我尝试invoke-sql从 Powershell X86执行命令时出现错误

invoke-sqlcmd -Query "SELECT 'HELLO!'" -ServerInstance Server -Database DB
Run Code Online (Sandbox Code Playgroud)

invoke-sqlcmd :无法加载文件或程序集“Microsoft.SqlServer.BatchParser,版本=15.100.0.0,文化=中性,PublicKeyToken=89845dcd8080cc91”或其依赖项之一。该系统找不到指定的文件。

如果我从常规 x64 Powershell 提示符运行完全相同的命令,我不会收到错误

invoke-sqlcmd -Query "SELECT 'HELLO!'" -ServerInstance Server -Database DB
Run Code Online (Sandbox Code Playgroud)
Column1
-------
HELLO!
Run Code Online (Sandbox Code Playgroud)

这是在新建的 Windows 2016 x64 位服务器上:

操作系统名称 Microsoft Windows Server 2016 数据中心版本 10.0.14393 内部版本 14393

我需要 x86 powershell 来运行使用旧版 32 位 ODBC 驱动程序的脚本,它还使用invoke-sql命令。

sql-server powershell x86 windows-server-2016

6
推荐指数
1
解决办法
8272
查看次数

标签 统计

powershell ×1

sql-server ×1

windows-server-2016 ×1

x86 ×1