Deploy to Azure SQL database

Hi,

Can someone tell me how can I use Octopus to upgrade database with DACPAC file? I’ve setup the build to create and push nuget package with BACPAC files to Octopus, but now I’m stuck with doing actual database upgrade.

Regards,

Hi,

Thanks for getting in touch! After including your DACPAC file into the package, you could have a deploy step which executes something like DbUp to run the change scripts that you need to run. This is described in some additional detail in our documentation.

Additionally, we have a library step template written by the community called SQL - Deploy DACPAC. Would this be of any use in your scenario?

https://library.octopusdeploy.com/step-templates/58399364-4367-41d5-ad35-c2c6a8258536/actiontemplate-sql-deploy-dacpac

I hope this helps! Let me know how you go or if you have any further questions moving forward. :slight_smile:

Best regards,

Kenny

Hi Kenneth,

I am not sure if is it possible to add Azure Cloud SQL Server as a deployment target? As far as I know, I cannot install tentacle on Azure SQL server, so how can I push package there using this step and deploy it?

DbUp is for running change scripts, I imported my db as a project in Visual Studio, so I was thinking about state driven delivery…

Regards,

Hi,

Thanks for following up! I’m terribly sorry about the delay in getting back to you. Perhaps a jump box set up (with a Tentacle installed between the Octopus server and SQL server), like we have outlined in the previously linked documentation page, may be a good approach.

Would this help in your scenario? Let me know what you think, or if you have any further questions. :slight_smile:

Best regards,

Kenny

Hi Kenneth,

Thank you for your time, I will read and see how I can use it.

Regards,

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.