【问题标题】:CAQuietExec: Unable to connect to target server: Wix InstallerCAQuietExec:无法连接到目标服务器:Wix 安装程序
【发布时间】:2023-04-03 01:18:02
【问题描述】:

尝试在客户端机器上运行安装程序失败。安装程序是用 Wix 和 C# 制作的。通过查看日志;我有几行错误。

MSI (s) (F4:A4) [01:52:37:027]: Executing op: CustomActionSchedule(Action=sqlcmd,ActionType=1025,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"C:\Program Files (x86)\<directory>\XYZ_Create.dacpac" /TargetConnectionString:"Data Source=ServerName;Initial Catalog=XYZ;Integrated Security=True")
MSI (s) (F4:C4) [01:52:37:027]: Invoking remote custom action. DLL: C:\windows\Installer\MSI1CAA.tmp, Entrypoint: CAQuietExec
CAQuietExec:  Entering CAQuietExec in C:\windows\Installer\MSI1CAA.tmp, version 3.10.2516.0
CAQuietExec:  "C:\Program Files (x86)\Microsoft SQL Server\120\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"C:\Program Files (x86)\<directory>\XYZ_Create.dacpac" /TargetConnectionString:"Data Source=ServerName;Initial Catalog=PsrX;Integrated Security=True"
CAQuietExec:  Publishing to database 'PsrX' on server 'ServerName'.
CAQuietExec:  Initializing deployment (Start)
CAQuietExec:  Initializing deployment (Failed)
CAQuietExec:  *** Could not deploy package.
CAQuietExec:  Unable to connect to target server.
CAQuietExec:  Error 0x80070001: Command line returned an error.
CAQuietExec:  Error 0x80070001: QuietExec Failed
CAQuietExec:  Error 0x80070001: Failed in ExecCommon method

CAQuietExec 提到的 Wix 代码是:

```Wix  Code   
<CustomAction Id="sqlcmd"
                      BinaryKey="WixCA"
                      DllEntry="CAQuietExec"
                      Return="check"
                      Execute="deferred"
                      Impersonate="yes" />
```

客户端正在使用 SQL Server 2016。

我从网上尝试了一些解决方案: https://blogs.msdn.microsoft.com/sqlserverfaq/2016/10/12/error-could-not-deploy-package-unable-to-connect-to-target-server/(我将 DAC 文件夹从 120 复制到 130 并尝试但仍然没有运气)。

我已与客户核实登录用户是否存在任何访问/权限问题,但他们拒绝了。

此安装程序正在为其他少数客户端工作。

有人可以帮我吗?谢谢!

【问题讨论】:

    标签: c# sql-server wix installation


    【解决方案1】:
    【解决方案2】:

    如上所述,此客户端正在使用 SQL Server 2016。

    在 CustomAction 中它试图从 property.wxs 获取所有可用的 sql server

    -- CustomAction Code
    string[] sqlVersions = session["SQLVERSIONS"].Split(';');
    
    
    -- Property.wxs
      <Property Id="SQLVERSIONS" Secure="yes" Value="140,130;120;110;100;90"></Property>
    

    在这里,没有 140。因此,它无法找到 140 DAC 文件夹,因此失败并出现错误。 它正在尝试使用与此客户端不兼容的 120 个文件夹结构。

    【讨论】:

      猜你喜欢
      • 2019-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-05
      相关资源
      最近更新 更多