Command line helper utility for executing SQL Server Data-Tier Application Framework package (dacpac). For more info, refer here
-
Download latest
dacpac-cli.exe
here
dacpac-cli.exe [options]
Options | Is Required | Description | Can pull from Environment Variable |
---|---|---|---|
-c, --command | Yes | Dacpac command (script, deploy and extract) | No |
-f, --package | Yes | Dacpac package full path or relative to the this exe including dacpac filename. | Yes |
-n, --connection | Yes | Connection string of the target database. | Yes |
-p, --parameters | No | Array of parameters (| seperated, to do @@token_name@@ token replacement in post deploy scripts . E.g. To replace token @@DATABASE@@ and @@SERVER@@ in a script, your command argument should be -p [SERVER=env:<env variable> |DATABASE=database1] |
No |
-a, --arguments | No | Array of arguments for commands; For script and deploy use DacDeployOptions; For extract use DacExtractOptions; E.g -a [BlockOnPossibleDataLoss=true,IncludeTransactionalScripts=false] |
No |
--version | No | Show assembly version information | No |
-?, -h, --help | No | Show help and usage information | No |
Eligible arguments can be passed as environment variable, as env:<variable_name>
dacpac-cli.exe -c deploy -f MyDB.dacpac -n "Data Source=server1;Initial Catalog=db1;Persist Security Info=True;User ID=user1;Password=password1" -a [BlockOnPossibleDataLoss=false]
dacpac-cli.exe -c deploy -f MyDB.dacpac -n "env:ConnectionString" -a [BlockOnPossibleDataLoss=false]
- Download the source code
- Execute the command
.\build.cmd dp
, which will produce the executable underpublish-artifacts
- Please raise issues here