简体   繁体   English

CAQuietExec:无法连接到目标服务器:Wix安装程序

[英]CAQuietExec: Unable to connect to target server: Wix Installer

Installer is getting failed while try running it in client machine. 尝试在客户端计算机上运行安装程序时,安装程​​序失败。 Installer is made with Wix and C# both. 安装程序由Wix和C#共同完成。 By seeing logs; 通过查看日志; I got few lines of error. 我有几行错误。

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

The Wix code where CAQuietExec mentioned is: CAQuietExec提到的Wix代码是:

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

Client is working on SQL Server 2016. 客户端正在使用SQL Server 2016。

I have tried some solution from online: https://blogs.msdn.microsoft.com/sqlserverfaq/2016/10/12/error-could-not-deploy-package-unable-to-connect-to-target-server/ ( I copied DAC folder from 120 to 130 and tried but still no luck). 我已经从网上尝试了一些解决方案: https : //blogs.msdn.microsoft.com/sqlserverfaq/2016/10/12/error-could-not-deploy-package-unable-to-connect-to-target-server/ (我将DAC文件夹从120复制到130,并尝试过但还是没有运气)。

I have checked with client if there is any access/privilege issue with login user but they denied. 我已经与客户端检查了登录用户是否存在任何访问/特权问题,但他们拒绝了。

This installer is working for other few clients. 该安装程序正在为其他少数客户端工作。

Can someone please help me here? 有人可以在这里帮我吗? Thank You! 谢谢!

As mentioned above this client is working on SQL Server 2016. 如上所述,此客户端正在使用SQL Server 2016。

In CustomAction It was trying to fetch all available sql server from property.wxs 在CustomAction中,它试图从property.wxs中获取所有可用的sql服务器。

-- CustomAction Code
string[] sqlVersions = session["SQLVERSIONS"].Split(';');


-- Property.wxs
  <Property Id="SQLVERSIONS" Secure="yes" Value="140,130;120;110;100;90"></Property>

Here, 140 was not there. 在这里,没有140。 So, it was not able to find out 140 DAC folder and hence failing with error. 因此,它无法找出140 DAC文件夹,因此失败并显示错误。 It was trying with 120 folder structure which was not compatible for this client. 尝试使用与该客户端不兼容的120文件夹结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM