We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Hotzi
Posts: 5
Joined: Thu Oct 02, 2014 5:57 am

Problem with SQLPackage.exe

Hello,

i want to update my datatabase (dacpac file) with the SQLPackage-Utility from Microsoft.
In this case i have created a Custom Action - "Launch attached file":
SourcePath: C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
Command: /Action:Publish "/SourceFile:C:\Temp\Test.dacpac" "/TargetDatabaseName:ARES_Steuerung" /TargetServerName:TestServer

But the installation (custom action) always runs on an error.

When I run the command in the CMD manually, all works fine
C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin /Action:Publish "/SourceFile:C:\Temp\Test.dacpac" "/TargetDatabaseName:ARES_Steuerung" /TargetServerName:TestServer

Can someone help me?
Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with SQLPackage.exe

Hi and welcome to Advanced Installer forums.

In order to install a package from another package, the "Prerequisites" support should be used. You should not add the "SQLPackage.exe" file as a custom action, because it will conflict with the main package.

Instead, it is recommended to can go in the "Prerequisites" page and add it as described in the "Add Prerequisite" tutorial.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hotzi
Posts: 5
Joined: Thu Oct 02, 2014 5:57 am

Re: Problem with SQLPackage.exe

Thanks for the quick response.
Yes, i think Prerquistes are the right way.

Requirement for the SQLPackage-Execution is SQLServer 2012 Express

So that the SqlPackage works correct i have to add also 4 additional files (placed in C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\), 1 additonal file (C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies) that i can't add, because it isn't in the main/subfolder from the SQLPackage.exe
pre.jpg
pre.jpg (166.18 KiB) Viewed 6174 times
So, how can I handle this?
Thanks!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with SQLPackage.exe

Hi,

If the "SQLServer 2012 Express" is required for the "SQLPackage" software, you can go in the "Install Conditions" tab and set the appropriate conditions, so it will not be installed if the "SQLServer 2012 Express" is not found on the machine.

The files added in the "Additional Files" section of a prerequisite will be extracted in the same folder with that prerequisite, so it can use them during the installation.

If you want to install the other files into other folders, you can add them in the "Files and Folders" page in the appropriate folders. It is also very easy to create property-based folders to install them to the desired location.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”