File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,29 @@ The **SqlPackage.exe** command line allows you to specify these actions along wi
3838```
3939SqlPackage {parameters}{properties}{SQLCMD Variables}
4040```
41-
41+
42+ ### Usage Examples
43+
44+ ** Generating a comparison between databases using .dacpac files with a SQL script output.**
45+
46+ Start by creating a .dacpac file of your latest database changes
47+
48+ ```
49+ sqlpackage.exe /TargetFile:"C:\sqlpackageoutput\output_current_version.dacpac" /Action:Extract /SourceServerName:"." /SourceDatabaseName:"Contoso.Database"
50+ ```
51+
52+ Create a .dacpac file of your database target (that has no changes):
53+
54+ ```
55+ sqlpackage.exe /TargetFile:"C:\sqlpackageoutput\output_target.dacpac" /Action:Extract /SourceServerName:"." /SourceDatabaseName:"Contoso.Database"
56+ ```
57+
58+ Create a SQL Script that generates the differences of two .dacpac files:
59+
60+ ```
61+ sqlpackage.exe /Action:Script /SourceFile:"C:\sqlpackageoutput\output_current_version.dacpac" /TargetFile:"C:\sqlpackageoutput\output_target.dacpac" /TargetDatabaseName:"Contoso.Database" /OutputPath:"C:\sqlpackageoutput\output.sql"
62+ ```
63+
4264### Help for the Extract action
4365
4466| Parameter| Short Form| Value| Description|
You can’t perform that action at this time.
0 commit comments