Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the syntax for adding multiple arguments onto the "Variables" parameter in sqlpackage.exe?

I am using SqlPackage.exe for my deployment. I have read the documentation here for the usage of SqlPackage.exe.

The documentation only states the synax for one variable:

Specifies a name value pair for an action specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error will result if a value is not provided for every variable.

My problem is that the documentation does not say how to pass multiple arguments into the Variables parameter. For example, I want to do this:

sqlpackage.exe ...args go here...  /Variables:VarToOverride=Value1,Var2ToOverride=Value2

Does anyone know the syntax for this?

like image 209
gregpakes Avatar asked Mar 19 '13 14:03

gregpakes


People also ask

What is SqlPackage EXE?

SqlPackage.exe is a command-line utility that automates the following database development tasks by exposing some of the public Data-Tier Application Framework (DacFx) APIs: Version: Returns the build number of the SqlPackage application.

Where can I find SqlPackage EXE?

In my case, the executable file for the SQLPackage is usually located at “C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin“. Once the path has been added click on OK. Now that the path of the executable has been added to the system variables, we can directly call the SQLPackage from the command-line.

What is Dacpac and Bacpac?

File formatdacpac is a compressed folder with a . dacpac extension, and similarly a . bacpac is a compressed folder with a . bacpac extension. An advanced user can unpack the file to view the multiple XML sections representing details of the origin, the objects in the database, and other characteristics.


1 Answers

You can specify the multiple arguments as below. /p:CreateNewDatabase=True /p:Storage=File /p:DatabaseEdition=Standard /p:DatabaseServiceObjective=S3 /p:DatabaseMaximumSize=50 Giving space after each argument.

like image 157
Amol R Avatar answered Oct 09 '22 23:10

Amol R