Database Deployment Issue

We are trying to do a database deployment in a certain project for the first time. It runs successfully in our development environment but fails in our test environment. While I don’t believe this is a uniquely Octopus issue, I was wondering if anyone in the community has encountered this error before.

SqlCommandVariableValues : {}
Extracting target server dacpac
OperationStopped: Deployment failed 2: Exception calling “Extract” with “4” argument(s): “Could not extract package from specified database.”
Reason: Could not extract package from specified database.
At E:\Octopus\Tentacle\Work\20220222164147-417533-20\Script.ps1:409 char:3

  •     Throw ("Deployment failed 2: {0} `r`nReason: {1}" -f $_.Excep ... 
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

at Invoke-DacPacUtility, E:\Octopus\Tentacle\Work\20220222164147-417533-20\Script.ps1: line 409
at , E:\Octopus\Tentacle\Work\20220222164147-417533-20\Script.ps1: line 459
at , : line 1
at , E:\Octopus\Tentacle\Work\20220222164147-417533-20\Octopus.FunctionAppenderContext.ps1: line 185
at , E:\Octopus\Tentacle\Work\20220222164147-417533-20\Bootstrap.Octopus.FunctionAppenderContext.ps1: line 4662
at , : line 1
at , : line 1
Extracting schema (Start)
Extracting schema (Failed)

Hi John,

Welcome to our help forums!

I’ve replied to the support ticket you have raised. Are you okay with us continuing the investigation there, and then when we get to the bottom of it I’ll post the solution here publically?

Hope to hear from you soon!
Kind Regards

We finally identified the issue. “View any definition” server level permission was missing for our test service account on the test SQL Server and that caused the dacpac schema compare to fail. Thank you for your prompt reply.


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