Azure DevOps SQL DB Deploy

Viewed 1198

I'm trying to deploy a dacpac with db references to 2 other dbs using Azure DevOps. I'm unable to find the right syntax for mentioning additional arguments for the sqlcmd variables for those dbs. I keep getting 'Unrecognized command line argument' error everytime I trigger deployment. the current syntax I'm using is

/Variables:variable1 = "value1" /Variables:variable2 = "value2"
1 Answers

Follow documentation https://docs.microsoft.com/en-us/sql/tools/sqlpackage?view=sql-server-ver15 and use

SQLCMD Variables The following table describes the format of the option that you can use to override the value of a SQL command (sqlcmd) variable used during a publish action. The values of variable specified on the command line override other values assigned to the variable (for example, in a publish profile).

Parameter Default Description /Variables:{PropertyName}={Value} Specifies a name value pair for an action-specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error results if a value is not provided for every variable.

/Variables: /v {PropertyName}={Value} Specifies a name value pair for an action-specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error results if a value is not provided for every variable.

Related