CAQuietExec: Unable to connect to target server: Wix Installer

0

Installer is getting failed while try running it in client machine. Installer is made with Wix and C# both. 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:

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

Client is working on 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).

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!

c#
sql-server
wix
installation
asked on Stack Overflow Jun 28, 2019 by Shyam Dixit • edited Jun 28, 2019 by jarlh

2 Answers

0
0

As mentioned above this client is working on SQL Server 2016.

In CustomAction It was trying to fetch all available sql server from property.wxs

-- 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. So, it was not able to find out 140 DAC folder and hence failing with error. It was trying with 120 folder structure which was not compatible for this client.

answered on Stack Overflow Jul 2, 2019 by Shyam Dixit

User contributions licensed under CC BY-SA 3.0