Skip to content

Commit d27c37a

Browse files
authored
Merge pull request #23777 from dzsquared/sqlpackage-summary-page
updating summary page for sqlpackage
2 parents edd5802 + e7dcbb5 commit d27c37a

1 file changed

Lines changed: 49 additions & 184 deletions

File tree

docs/tools/sqlpackage/sqlpackage.md

Lines changed: 49 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -37,78 +37,30 @@ The **SqlPackage.exe** command line tool allows you to specify these actions alo
3737

3838
## Command-Line Syntax
3939

40-
**SqlPackage.exe** initiates the actions specified using the parameters, properties, and SQLCMD variables specified on the command line.
40+
**SqlPackage.exe** initiates the actions specified using the [parameters](#parameters), [properties](#properties), and SQLCMD variables specified on the command line.
4141

42-
```cmd
43-
SqlPackage {parameters}{properties}{SQLCMD Variables}
42+
```bash
43+
SqlPackage {parameters} {properties} {SQLCMD variables}
4444
```
4545

46-
### Usage examples
47-
48-
Further examples are available on the individual action pages.
49-
50-
**Generate a comparison between databases by using .dacpac files with a SQL script output**
51-
52-
Start by creating a .dacpac file of your latest database changes:
46+
### Exit codes
5347

54-
```cmd
55-
sqlpackage.exe /TargetFile:"C:\sqlpackageoutput\output_current_version.dacpac" /Action:Extract /SourceServerName:"." /SourceDatabaseName:"Contoso.Database"
56-
```
57-
58-
Create a .dacpac file of your database target (that has no changes):
59-
60-
```cmd
61-
sqlpackage.exe /TargetFile:"C:\sqlpackageoutput\output_target.dacpac" /Action:Extract /SourceServerName:"." /SourceDatabaseName:"Contoso.Database"
62-
```
63-
64-
Create a SQL script that generates the differences of two .dacpac files:
65-
66-
```cmd
67-
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"
68-
```
69-
70-
71-
## Support
72-
73-
The DacFx library and the SqlPackage CLI tool have adopted the [Microsoft Modern Lifecycle Policy](https://support.microsoft.com/help/30881/modern-lifecycle-policy). All security updates, fixes, and new features will be released only in the latest point version of the major version. Maintaining your DacFx or SqlPackage installations to the current version helps ensure that you will receive all applicable bug fixes in a timely manner.
48+
SqlPackage commands return the following exit codes:
7449

75-
### Supported SQL offerings
76-
77-
SqlPackage and DacFx supports all [supported SQL versions](/lifecycle/products/?products=sql-server) at time of the SqlPackage/DacFx release. For example, a SqlPackage release on January 14th 2022 supports all supported versions of SQL in January 14th 2022. For more on SQL support policies, see [the SQL support policy](/troubleshoot/sql/general/support-policy-sql-server#support-policy).
78-
79-
80-
81-
82-
## Version
83-
84-
Displays the sqlpackage version as a build number. Can be used in interactive prompts as well as in [automated pipelines](sqlpackage-pipelines.md).
85-
86-
```cmd
87-
sqlpackage.exe /Version
88-
```
89-
90-
## Help
50+
- 0 = success
51+
- non-zero = failure
9152

92-
You can display SqlPackage usage information by using `/?` or `/help:True`.
53+
### Usage example
9354

94-
```cmd
95-
sqlpackage.exe /?
96-
```
55+
Further examples are available on the individual action pages.
9756

98-
For parameter and property information specific to a particular action, use the help parameter in addition to that action's parameter.
57+
**Creating a .dacpac file of the current database schema:**
9958

10059
```cmd
101-
sqlpackage.exe /Action:Publish /?
60+
sqlpackage.exe /TargetFile:"C:\sqlpackageoutput\output_current_version.dacpac" /Action:Extract /SourceServerName:"." /SourceDatabaseName:"Contoso.Database"
10261
```
10362

104-
## Exit codes
105-
106-
Commands that return the following exit codes:
107-
108-
- 0 = success
109-
- non-zero = failure
110-
111-
## Parameters
63+
### Parameters
11264

11365
Some parameters are shared between the SqlPackage actions. Below is a table summarizing the parameters, for more information click into the specific action pages.
11466

@@ -149,135 +101,48 @@ Some parameters are shared between the SqlPackage actions. Below is a table summ
149101
|**/UniversalAuthentication:**|**/ua**| x | x | x | x | x | x | x |
150102
|**/Variables:**|**/v**| | | | | x | | x |
151103

152-
## Properties
153-
154-
Some properties are shared between the SqlPackage actions. Below is a table summarizing the properties, for more information click into the specific action pages.
155-
156-
| Property | [Extract](sqlpackage-extract.md#properties-specific-to-the-extract-action) | [Publish](sqlpackage-publish.md#properties-specific-to-the-publish-action) | [Export](sqlpackage-export.md#properties-specific-to-the-export-action) | [Import](sqlpackage-import.md#properties-specific-to-the-import-action) | [DeployReport](sqlpackage-deploy-drift-report.md#deployreport-action-properties) | [Script](sqlpackage-script.md#properties-specific-to-the-script-action) |
157-
|---|---|---|---|---|---|---|
158-
|AdditionalDeploymentContributorArguments=(STRING)| | x | | | x | x |
159-
|AdditionalDeploymentContributors=(STRING)| | x | | | x | x |
160-
|AdditionalDeploymentContributorPaths=(STRING)| | x | | | x | x |
161-
|AllowDropBlockingAssemblies=(BOOLEAN)| | x | | | x | x |
162-
|AllowIncompatiblePlatform=(BOOLEAN)| | x | | | x | x |
163-
|AllowUnsafeRowLevelSecurityDataMovement=(BOOLEAN)| | x | | | x | x |
164-
|AzureSharedAccessSignatureToken=(STRING)| | x | | | | |
165-
|AzureStorageBlobEndpoint=(STRING)| x | x | | | | |
166-
|AzureStorageContainer=(STRING)| x | x | | | | |
167-
|AzureStorageKey=(STRING)| x | x | | | | |
168-
|AzureStorageRootPath=(STRING)| x | x | | | | |
169-
|BackupDatabaseBeforeChanges=(BOOLEAN)| | x | | | x | x |
170-
|BlockOnPossibleDataLoss=(BOOLEAN 'True')| | x | | | x | x |
171-
|BlockWhenDriftDetected=(BOOLEAN 'True')| | x | | | x | x |
172-
|CommandTimeout=(INT32 '60')| x | x | x | x | x | x |
173-
|CommentOutSetVarDeclarations=(BOOLEAN)| | x | | | x | x |
174-
|CompareUsingTargetCollation=(BOOLEAN)| | x | | | x | x |
175-
|CompressionOption=(ENUM 'Normal')| x | | x | | | |
176-
|CreateNewDatabase=(BOOLEAN)| | x | | | x | x |
177-
|DacApplicationDescription=(STRING)| x | | | | | |
178-
|DacApplicationName=(STRING)| x | | | | | |
179-
|DacMajorVersion=(INT32 '1')| x | | | | | |
180-
|DacMinorVersion=(INT32 '0')| x | | | | | |
181-
|DatabaseEdition=(ENUM 'Default')| | x | | x | x | x |
182-
|DatabaseLockTimeout=(INT32 '60')| x | x | x | | x | x |
183-
|DatabaseMaximumSize=(INT32)| | x | | x | x | x |
184-
|DatabaseServiceObjective=(STRING)| | x | | x | x | x |
185-
|DeployDatabaseInSingleUserMode=(BOOLEAN)| | x | | | x | x |
186-
|DisableAndReenableDdlTriggers=(BOOLEAN 'True')| | x | | | x | x |
187-
|DisableIndexesForDataPhase=(BOOLEAN 'True')| | | | x | | |
188-
|DoNotAlterChangeDataCaptureObjects=(BOOLEAN 'True')| | x | | | x | x |
189-
|DoNotAlterReplicatedObjects=(BOOLEAN 'True')| | x | | | x | x |
190-
|DoNotDropObjectType=(STRING)| | x | | | x | x |
191-
|DoNotDropObjectTypes=(STRING)| | x | | | x | x |
192-
|DropConstraintsNotInSource=(BOOLEAN 'True')| | x | | | x | x |
193-
|DropDmlTriggersNotInSource=(BOOLEAN 'True')| | x | | | x | x |
194-
|DropExtendedPropertiesNotInSource=(BOOLEAN 'True')| | x | | | x | x |
195-
|DropIndexesNotInSource=(BOOLEAN 'True')| | x | | | x | x |
196-
|DropObjectsNotInSource=(BOOLEAN)| | x | | | x | x |
197-
|DropPermissionsNotInSource=(BOOLEAN)| | x | | | x | x |
198-
|DropRoleMembersNotInSource=(BOOLEAN)| | x | | | x | x |
199-
|DropStatisticsNotInSource=(BOOLEAN 'True')| | x | | | x | x |
200-
|EnclaveAttestationProtocol=(STRING)| | x | | | | |
201-
|EnclaveAttestationUrl=(STRING)| | x | | | | |
202-
|ExcludeObjectType=(STRING)| | x | | | x | x |
203-
|ExcludeObjectTypes=(STRING)| | x | | | x | x |
204-
|ExtractAllTableData=(BOOLEAN)| x | | | | | |
205-
|ExtractApplicationScopedObjectsOnly=(BOOLEAN 'True')| x | | | | | |
206-
|ExtractReferencedServerScopedElements=(BOOLEAN 'True')| x | | | | | |
207-
|ExtractUsageProperties=(BOOLEAN)| x | | | | | |
208-
|GenerateSmartDefaults=(BOOLEAN)| | x | | | x | x |
209-
|IgnoreAnsiNulls=(BOOLEAN 'True')| | x | | | x | x |
210-
|IgnoreAuthorizer=(BOOLEAN)| | x | | | x | x |
211-
|IgnoreColumnCollation=(BOOLEAN)| | | | | x | x |
212-
|IgnoreColumnOrder=(BOOLEAN)| | x | | | x | x |
213-
|IgnoreComments=(BOOLEAN)| | x | | | x | x |
214-
|IgnoreCryptographicProviderFilePath=(BOOLEAN 'True')| | x | | | x | x |
215-
|IgnoreDdlTriggerOrder=(BOOLEAN)| | x | | | x | x |
216-
|IgnoreDdlTriggerState=(BOOLEAN)| | x | | | x | x |
217-
|IgnoreDefaultSchema=(BOOLEAN)| | x | | | x | x |
218-
|IgnoreDmlTriggerOrder=(BOOLEAN)| | x | | | x | x |
219-
|IgnoreDmlTriggerState=(BOOLEAN)| | x | | | x | x |
220-
|IgnoreExtendedProperties=(BOOLEAN)| x | x | | | x | x |
221-
|IgnoreFileAndLogFilePath=(BOOLEAN 'True')| | x | | | x | x |
222-
|IgnoreFilegroupPlacement=(BOOLEAN 'True')| | x | | | x | x |
223-
|IgnoreFileSize=(BOOLEAN 'True')| | x | | | x | x |
224-
|IgnoreFillFactor=(BOOLEAN 'True')| | x | | | x | x |
225-
|IgnoreFullTextCatalogFilePath=(BOOLEAN 'True')| | x | | | x | x |
226-
|IgnoreIdentitySeed=(BOOLEAN)| | x | | | x | x |
227-
|IgnoreIncrement=(BOOLEAN)| | x | | | x | x |
228-
|IgnoreIndexOptions=(BOOLEAN)| | x | | | x | x |
229-
|IgnoreIndexPadding=(BOOLEAN 'True')| | x | | | x | x |
230-
|IgnoreKeywordCasing=(BOOLEAN 'True')| | x | | | x | x |
231-
|IgnoreLockHintsOnIndexes=(BOOLEAN)| | x | | | x | x |
232-
|IgnoreLoginSids=(BOOLEAN 'True')| | x | | | x | x |
233-
|IgnoreNotForReplication=(BOOLEAN)| | x | | | x | x |
234-
|IgnoreObjectPlacementOnPartitionScheme=(BOOLEAN 'True')| | x | | | x | x |
235-
|IgnorePartitionSchemes=(BOOLEAN)| | x | | | x | x |
236-
|IgnorePermissions=(BOOLEAN 'True')| x | x | | | x | x |
237-
|IgnoreQuotedIdentifiers=(BOOLEAN 'True')| | x | | | x | x |
238-
|IgnoreRoleMembership=(BOOLEAN)| | x | | | x | x |
239-
|IgnoreRouteLifetime=(BOOLEAN 'True')| | x | | | x | x |
240-
|IgnoreSemicolonBetweenStatements=(BOOLEAN 'True')| | x | | | x | x |
241-
|IgnoreTableOptions=(BOOLEAN)| | x | | | x | x |
242-
|IgnoreTablePartitionOptions=(BOOLEAN)| | x | | | x | x |
243-
|IgnoreUserLoginMappings=(BOOLEAN)| x | | | | | |
244-
|IgnoreUserSettingsObjects=(BOOLEAN)| | x | | | x | x |
245-
|IgnoreWhitespace=(BOOLEAN 'True')| | x | | | x | x |
246-
|IgnoreWithNocheckOnCheckConstraints=(BOOLEAN)| | x | | | x | |
247-
|IgnoreWithNocheckOnForeignKeys=(BOOLEAN)| | x | | | x | |
248-
|ImportContributorArguments=(STRING)| | | | x | | |
249-
|ImportContributors=(STRING)| | | | x | | |
250-
|ImportContributorPaths=(STRING)| | | | x | | |
251-
|IncludeCompositeObjects=(BOOLEAN)| | x | | | x | x |
252-
|IncludeTransactionalScripts=(BOOLEAN)| | x | | | x | x |
253-
|LongRunningCommandTimeout=(INT32 '0')| x | x | x | x | x | x |
254-
|NoAlterStatementsToChangeClrTypes=(BOOLEAN)| | x | | | x | x |
255-
|PopulateFilesOnFileGroups=(BOOLEAN 'True')| | x | | | x | x |
256-
|RebuildIndexesOfflineForDataPhase=(BOOLEAN 'False')| | | | x | | |
257-
|RegisterDataTierApplication=(BOOLEAN)| | x | | | x | x |
258-
|RunDeploymentPlanExecutors=(BOOLEAN)| | x | | | x | x |
259-
|ScriptDatabaseCollation=(BOOLEAN)| | x | | | x | x |
260-
|ScriptDatabaseCompatibility=(BOOLEAN)| | x | | | x | x |
261-
|ScriptDatabaseOptions=(BOOLEAN 'True')| | x | | | x | x |
262-
|ScriptDeployStateChecks=(BOOLEAN)| | x | | | x | x |
263-
|ScriptFileSize=(BOOLEAN)| | x | | | x | x |
264-
|ScriptNewConstraintValidation=(BOOLEAN 'True')| | x | | | x | x |
265-
|ScriptRefreshModule=(BOOLEAN 'True')| | x | | | x | x |
266-
|Storage=({File|Memory})| x | x | x | x | x | x |
267-
|TableData=(STRING)| x | | x | | | |
268-
|TargetEngineVersion=(ENUM 'Latest')| | | x | | | |
269-
|TempDirectoryForTableData=(STRING)| x | | x | | | |
270-
|TreatVerificationErrorsAsWarnings=(BOOLEAN)| | x | | | x | x |
271-
|UnmodifiableObjectWarnings=(BOOLEAN 'True')| | x | | | x | x |
272-
|VerifyCollationCompatibility=(BOOLEAN 'True')| | x | | | x | x |
273-
|VerifyDeployment=(BOOLEAN 'True')| | x | | | x | x |
274-
|VerifyExtraction=(BOOLEAN)| x | | | | | |
275-
|VerifyFullTextDocumentTypesSupported=(BOOLEAN)| | | x | | | |
104+
### Properties
105+
106+
SqlPackage actions support a large number of properties to modify the default behavior of an action. For more information click into the specific action pages.
107+
108+
109+
## Utility commands
110+
111+
### Version
112+
113+
Displays the sqlpackage version as a build number. Can be used in interactive prompts as well as in [automated pipelines](sqlpackage-pipelines.md).
114+
115+
```cmd
116+
sqlpackage.exe /Version
117+
```
118+
119+
### Help
120+
121+
You can display SqlPackage usage information by using `/?` or `/help:True`.
122+
123+
```cmd
124+
sqlpackage.exe /?
125+
```
126+
127+
For parameter and property information specific to a particular action, use the help parameter in addition to that action's parameter.
128+
129+
```cmd
130+
sqlpackage.exe /Action:Publish /?
131+
```
276132

277133
## SqlPackage and database users
278134

279135
[Contained database users](../../relational-databases/security/contained-database-users-making-your-database-portable.md) are included in SqlPackage operations. However, the password portion of the definition is set to a randomly generated string by SqlPackage, the existing value is not transferred. It is recommended that the new user's password is reset to a secure value following the import of a `.bacpac` or the deployment of a `.dacpac`. In an automated environment the password values can be retrieved from a secure keystore, such as Azure Key Vault, in a step following SqlPackage.
280136

137+
138+
## Support
139+
140+
The DacFx library and the SqlPackage CLI tool have adopted the [Microsoft Modern Lifecycle Policy](https://support.microsoft.com/help/30881/modern-lifecycle-policy). All security updates, fixes, and new features will be released only in the latest point version of the major version. Maintaining your DacFx or SqlPackage installations to the current version helps ensure that you will receive all applicable bug fixes in a timely manner.
141+
142+
### Supported SQL offerings
143+
144+
SqlPackage and DacFx supports all [supported SQL versions](/lifecycle/products/?products=sql-server) at time of the SqlPackage/DacFx release. For example, a SqlPackage release on January 14th 2022 supports all supported versions of SQL in January 14th 2022. For more on SQL support policies, see [the SQL support policy](/troubleshoot/sql/general/support-policy-sql-server#support-policy).
145+
281146
## Next steps
282147

283148
- Learn more about [SqlPackage Extract](sqlpackage-extract.md)

0 commit comments

Comments
 (0)