-
Notifications
You must be signed in to change notification settings - Fork 3
SSDT Module
Matthew Kelly edited this page Aug 19, 2016
·
2 revisions
The SSDT module allows you to publish, or generate the SQL change script, of your database solution's dacpac file via SSDT's SqlPackage tool.
Key | Type | Description | Values |
---|---|---|---|
action | string | The type of action to perform | publish, script |
path | string | [Optional] This is the path to your SqlPackage.exe tool |
[Default] C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe |
source | string | This is the path to your dacpac file | - |
publish | string | [Optional] Only usable if the action is publish . This is the path to your publish profile XML file for the dacpac/environment. If this is not supplied, then you must supply arguments to the target database |
- |
output | string | Only usable if the action is script . This is the path to where the module will create the SQL change script |
- |
timeout | integer | [Optional] Specifies a timeout, in seconds, for SSDT. If not specified, the default value is SSDT's default | - |
backupFirst | boolean | [Optional] Specifies whether you want the target database to be backed-up before publishing | [Default] false |
dropFirst | boolean | [Optional] Specifies whether you want the target database to be dropped before publishing | [Default] false |
blockOnLoss | boolean | [Optional] Specifies whether you want SSDT to stop if it detects possible data loss during a publish | [Default] true |
arguments | string | [Optional] Additional arguments that you would like to be passed when SSDT is called | - |
The following is an example of using the SSDT module to publish a database:
{
"paint": [
{
"type": "ssdt",
"action": "publish",
"source": "C:\\path\\to\\some\\file.dacpac",
"publish": "C:\\path\\to\\some\\publish.xml",
"arguments": "/p:IgnorePermissions=True"
}
]
}
The above will publish the file.dacpac
using the publish profile publish.xml
. During the publish it will ignore any database permissions that may have changed.
The following is an exmaple of using the SSDT module to generate the SQL change script for a database:
{
"paint": [
{
"type": "ssdt",
"action": "script",
"source": "C:\\path\\to\\some\\file.dacpac",
"output": "C:\\path\\to\\create\\output.sql"
}
]
}
The above will generate the SQL change script for the file.dacpac
. The script will be placed at C:\\path\\to\\create\\output.sql
.
The erase section is identical to the paint section.